RockDog is right except I think he forgot a parenthesis there. Add a parenthesis around the last two (spur gear x internal ratio). Expressed like you would punch in a calculator, rollout is
Tire Diameter x 3.14 x pinion teeth / spur teeth / drivetrain ratio
Example, 62 mm rubber tires
62 mm x 3.14 x 31 teeth / 78 teeth / 2.5 = 30.9 mm
If you like english units, 30.9mm / (25.4 mm/inch) = 1.217 inches
This happens to be close to the right rollout for our local track for a CO27 stock motor.
I punched in mm tire diameters across a row, pinion sizes down a column on the left, copied the whole block for several spur gear sizes, typed in the formula into excel and copied it all down so I have a gear chart for my race log book. A cell phone calculator or hand math (if you're good) is OK but the chart is faster. People always say go to Gearchart.com to make one that is fine also. I just like my chart because I jam pack it full with all kinds of tire sizes and gear combos (plus I'm a geek I enjoy making stuff like that).