This can be found on Sheldon's site, but this is just basic geometry.
For each turn of the crank, you travel the circumference of the wheel multiplied by your gear ratio. If you know the circumference of your wheel (in meters) and your cadence and the size of your chainwheel and cog, then it's just:
You didn't specify, but since you say "maths" instead of "math", I'll assume you want km and m instead of miles and inches:
Speed (km/hr) = 0.06 x cadence(rev/min) x (Size of chainwheel in teeth) / (size of rear cog in teeth) x (circumference of wheel in meters)
Tricky part is wheel circumference - to guesstimate, get the bike on the sidewalk, orient wheel with valvestem down, put a chalk mark under valve, roll bike some number of wheel revolutions, chalk again, measure distance, divide by number of revolutions.