Here is an easy calculator you can use. You need to know your rear gear ratio and your rear tire diameter. The drive gear in a TH-400 typically has 15 teeth. The driven gears are color coded and fairly easy to replace. Remove the speedo cable, the gear cover and pull it out.
http://www.tciauto.com/speedometer-gear-calculator