Tool 06 · Navigation

Wheel Speed & Odometry Calculator

Your code counts encoder ticks; your robot moves in millimetres. This tool computes the conversion — counts per wheel turn, mm per tick, ticks per metre — and tells you whether your encoder resolution is actually good enough for the job.

Your drivetrain & encoder

Measure it — printed sizes lie by a few mm

Enter 1 if the encoder is on the wheel shaft

Pulses per revolution of the shaft it's mounted on

Loaded RPM ≈ 80% of the free-run figure

Please enter positive values in every field.

Odometry spec

Counts per wheel revolution
Distance per count
Counts per metre
Robot speed at that RPM
Count rate your code must handle

How this calculator works

Counts per wheel rev = PPR × decoding × gear ratio
Distance per count = (π × wheel diameter) ÷ counts per wheel rev
Robot speed = π × wheel diameter × (motor RPM ÷ ratio) ÷ 60
Count rate = counts per wheel rev × wheel RPM ÷ 60

Everything downstream — dead reckoning, velocity PID, "drive exactly 500 mm" functions — depends on one honest number: how far the robot moves per encoder count. The multiplication chain above is short, but each factor is a classic source of the mysterious 2× or 4× error that makes a robot drive twice as far as commanded.

The classic bug: the datasheet says "11 PPR" but your library counts every edge of both channels, so the code actually sees 44 counts per motor revolution. If your measured distances are exactly 2× or 4× off, the decoding factor is the first suspect — not the wheel size.

The count-rate figure matters more than beginners expect: a fast motor behind a high ratio with 4× decoding can push tens of thousands of interrupts per second at a microcontroller. If that number lands above roughly 50k on an Arduino Uno–class board, use hardware counters, drop to 1× decoding, or read the encoder with a dedicated peripheral.

Once you trust the conversion, feed the measured wheel speed into a velocity loop — the PID Tuning Visualizer shows what happens next — and use the Gear Ratio Calculator if the RPM-to-speed relationship isn't giving you the top speed you wanted.

Common questions

Why is my odometry drifting even with correct math?

Wheel slip, tyre squish under load (effective diameter shrinks 1–3%), and unequal left/right diameters. Calibrate by driving a measured 2–3 m on the real floor and scaling your mm-per-count constant to match — every serious team does this.

Encoder on the motor shaft or the wheel shaft?

Motor-shaft encoders get free resolution (multiplied by the gear ratio) but can't see gearbox backlash or belt slip. Wheel-shaft encoders measure the truth with fewer counts. Motor-shaft is the right default for velocity control; wheel-shaft wins for precise positioning.

Parts this calculation leads to

Links may be affiliate links (see footer disclosure).

Encoder Gearmotors

Gearmotors with quadrature encoders already fitted — the easy path.

Browse encoder motors →

Rotary Encoders

Add-on magnetic and optical encoders for existing shafts.

Browse encoders →

Robot Wheels

Accurate, consistent wheels make odometry math come true.

Browse wheels →

Microcontrollers

Boards with hardware quadrature counters for high tick rates.

Browse controllers →