### Calculating speed by rpm and wheel diameter

Calculating the speed of any machine is quite a simple task if you know the diameter and revenues per minute (rpm) of your motor or other power source spinning the wheel. Other variables might be gearbox or other rpm transitions between motor and wheel, for example, bicycle gears. For those, you need to know the gear ratio.

### Gear ratio

In this example, we have an electric motor that has a maximum rpm of 5000. The motor is a rotating gearbox with a gear ratio of 64:1, which means the gearbox will lower down the rpm by transforming the rotation to one time for every 64 revolutions of the motor.

#### Formula to calculate rpm after gearbox

1. motor_rpm / gearbox_ratio

In this example: 5000 rpm / 64 = 78.125 rpm

### Wheel diameter

For this calculation, we will use a wheel diameter of 220 millimetres (mm). To get the speed, you need to calculate the circumference of your wheel. This can be done by using π (Pi) value, just multiply your wheel diameter with it.

#### Formula to calculate wheel circumference from diameter

1. wheel_diameter * π
In this example: 220 mm * 3.14 = 690.8 mm

### Speed

Now you have your basic values to calculate speed. Wheel circumference of 690.8 mm and rpm of 78.125.

In order to get the actual speed, let's calculate it.

### Formula for kilometres in an hour (km/h)

1. rpm_after_gearbox * circumference / 1000 (meter: 1000 millimetres) = meters_per_minute
2. meters_per_minute * 60 (one hour) / 1000 (kilometer: 1000 meters) = km/h
Full formula: (motor_rpm / gearbox_ratio) * (wheel_diameter * π) / 1 000 000 (kilometer in millimetres) * 60 = km/h

In this example: (5000 / 64) * (220 * π) / 1 000 000  * 60 = 3.238125 (~3,2) km/h

### Formula for meters in second (m/s)

1. rpm_after_gearbox * circumference / 1 000 (meter: 1 000 millimetres) / 60 (seconds in minute)
Full formula: (motor_rpm / gearbox_ratio) * (wheel_diameter * π) / 1 000 / 60  = m/s

In this example: (5000 / 64) * (220 * π) / 1 000 / 60 = 0.899479167 (~ 0.9) m/s

## Calculator

The π value used in the calculator is 3.1415926535, which gives slightly different while more accurate values than in examples with a π value of 3.14.

 Motor rpm Gearbox ratio (min value 1) Wheel diameter mm Results Rpm after gear: 0 rpm Circumference: 0 mm Speed: 0 m/s Speed: 0 km/h