If the gears are original equipment to the car in question, the code is on the vehicle certification label (rear face of driver door) under AX (for V8s, M = 2.73, Z = 3.08, and E = 3.27), or on the tag attached to the rear axle's differential housing (the ratio is stamped, there are no "codes").
If the gears are not original equipment to the car in question, either jack the rear up and count the number of driveshaft revolutions to one tire revolution or open up the differential housing and divide number of teeth on the ring gear by the number of teeth on the pinion gear.
To know which speedometer driven gear is required you need to know which drive gear the transmission has (for T-5s, '83-mid '89 had 7T and mid '89-'95 had 8T), what the rear gear ratio is, and what the tire's RPM is (have to get that from the tire manuacturer):
Driven Gear = Drive Gear x Rear Gear Ratio x Tire's Revolutions Per Mile / 1000