On a direct drive car (like a 12th scale) use the following:
MMPR (MilliMeters Per Revolution, It's how far the car will travel in mm when the motor makes one revolution)
W= Wheel diameter in mm
S= Spur gear teeth (ex: 96T spur)
P= Pinion teeth (ex: 25T pinion)
Example: My 12th scale has a monster Pro and 39 MMPR is a good rollout for that motor. What Pinion do I use??
I measure, W=46mm, My spur is 96.
Round it off to P=26T
So slap in a 26T pinion and it's go time!!
For cars with internal drive ratios (Like a TC3, it has an internal drive ration of 2.5:1) Check your user manual for the drive ratio and add it to the above equation like so:
DR=Drive ratio (Ex: DR=2.5 for a TC3)
Example: I'm running a 19T spec motor in my TC3, what pinion do I use. Guys at the track say that 25 MMPR is a good start.
I measue, W=65mm (full size TC tire), My spur is 100T
Round it off to 30T or 31T
Select the 30T or the 31T and try it out.
This equation can be applied to any car, a AE B4 has a 2.6:1 drive ratio so just apply it as above.
Hope this helps.