We are moving to a server with less intrusive ads. New address is nightrider.mzf.cz (just replace "xf" with "mzf", all file names and locations stay the same).
Let's start with a definition: gear ratio is a number which, multiplied by a traveled angle of input shaft, gives us a traveled angle of output shaft. The angle can be replaced by other things: number of revolutions, rotation speed etc.. The ratio is a dimensionless number. Values greater than 1 are overdrives, those less than 1 are reductions. Negative value reverses the direction (usually not used on bikes), zero usually means chain failure.
Torque works the other way: it grows when speed decreases, so we must divide it by gear ratio instead of multiplying.
There are several gears on a bike. First are cranks which transform circular movement of feet to rotation of a shaft: longer ones create more torque, shorter ones more speed. Second part is usually the chain transmission from chainring to sprocket, third may be a hub gearbox. Last gear is the transmission from the drive wheel to the road: the larger the wheel, the further it rolls per one revolution. The complete gear is usually expressed in metres and says how far we go per one revolution of the cranks. English speaking countries also use gear inches, which is a diameter of a hypothetical wheel driven directly by the cranks. If you want to convert gear inches to metres, multiply them by 0.0798 (that's *π and /0.0254).
(just to make things clear: "*" is a multiplication operator, "/" is division and "-" is a minus, I don't use these characters in any other meanings here)
Chain gear ratio = number of teeth on the chainring / number of teeth on the sprocket. For example, with a fifty-tooth ring and twenty-tooth sprocket we get a ratio of z1/z2 = 50/20 = 2.5 (that's more than 1, so it's an overdrive gear).
The same equation applies for any other transmission where toothy cogs on stationary axles are involved: chain, toothed belt, pinions and even worms. And also friction gears, because number of teeth is nothing more than diameter multiplied by a constant. But it's not for epicyclic and harmonic gears.
Epicyclic gear consists of three parts: central sun gear, planet cage with several planet pinions (the more of them, the stronger the gearbox is, but theoretically you only need one) and outer gear ring. One part is stationary (marked gray on the following picture) and the remaining two parts move:
If I'm not mistaken, the ratios are:
In most cases hub gear manufacturers tell us the ratios directly, so we don't need to calculate anything.
Gears connected in series, i.e. output of first one being input of second one, simply multiply. For example a 46T chainring, 22T sprocket and a 0.75 hub gear (reducer), we get a total gear ratio of (46/22)*0.75 = 2.091*0.75 = 1.568.
Distance traveled per one revolution of a wheel is equal to its circumference. We can either measure it directly (which is most accurate), or calculate as π*diameter. Express the circumference in metres, multiply by the gear ratio from cranks to the driven wheel and you get the sought distance per one crank turn (if you don't see the angle or speed of the input shaft, it's because it equals 1 (one crank revolution) and number one is very stealthy in multiplications).
If we divide distance per crank revolution by crank circumference (2π times crank length, it's something slightly over 1 m for most cranks), we get a ratio between foot speed and bike speed (which means how many inches the bike travels when the foot travels one inch). If all your cranks are of the same length, you don't have to worry about this. But if not, you'd better calculate this total gear ratio and check if it doesn't reach into some unpedalable area.
Gear range is usually expressed in percents. It says how many times the fastest gear is bigger than the slowest one. For example a range of 300 % means gmax = 3*gmin. It doesn't matter whether you divide dimensionless ratios or complete gears in metres or inches, all units cancel each other and you get the same result.
Out of curiosity, I made a comparison of several transmission systems, both existing and hypothetic. Source data here (XLS), the most useful part are these plots (best viewed with browser window wide enough to fit them side by side):
First chart shows gears as distance traveled per one crank revolution. Second one shows them divided by circumference of that revolution to compensate for varying crank length. Light blue area in the middle is a range which works for level ground for me, faster gears are above and slower ones below. Little boxes labeled 40, 50 and 60 are roughly the top speeds in km/h which I can spin at the given gear value (only downhill in most cases). And now what the coloured lines mean:
If you are not fond of manual counting, you can use this automatic calculator:
Mainly for planning before buying or building a new bike. We can calculate gears of the bike we use now. We know what hills it can climb and how fast it can go. We also know if it is enough or if we want to move or extend the range somehow. So we can plan our ideal new gears and calculate the required tooth counts. It is significantly less work than a method of trial and error :-).