Most cars and trucks will have this written on the door jam with the VIN and build information. If not, you can use this method:
1. Block the front wheels so that they cannot move.
2. Jack the rear of the car up so that the rear tires are off the ground.
3. Put the vehicle in neutral (but not running).
4. Mark the driveshaft somewhere you can see it from a safe area.
5. Rotate the rear wheel towards the front of the car one full rotation while watching how many times the driveshaft turns.
2 ¾ rotations = 2.73 gears
Just past 3 rotations = 3.08 gears
3 ¼ rotations = 3.27 gears
3 ½ rotations = 3.55 gears
3 ¾ rotations = 3.73 gears
Just under 4 rotations = 3.90 gears
Just past 4 rotations = 4.10 gears
If you are having trouble determining the ratio, you can always call the car or truck's manufacturer's customer service phone number and provide the VIN; with this information, they will be able to tell you what the factory equipment was for the vehicle.