replaced speedometer driven gear with recommended 40 tooth and still not accurate...

To find actual tire diameter, go from the ground to the middle of your back wheel and multiply by 2.