The formula you are looking for is this
Code:
distance = (ticks) * (Gear Ratio) * (wheel diameter * pi)/(ticks per rev * scale)
Where Gear ratio is amount of times the wheel spins per amount of times the encoder spins, and scale is 4 (per what Kevin said above).
As I last saw them, the WPI Robotics Library encoder VI's had provisioning for real world unit distance feedback. The VI's had setters and getters for the gear ratio and distance travelled, respectively.