Work with percentages to determine the amount of change needed to correct the speedometer. Bring GPS to verify actual road speed. Go 50 mph on the GPS. what does your speedo read? If the speed reads 45 then you are 10% off, if it reads 42, then you are 16% off too slow. Lets say your speedo reads 42 at 50 for a 16% error. Remove the speedo driven gear from the trans. Let's say you have a 18 tooth driven gear and the example requires speeding up the speedo. You would multiply 18 x .84 to find 15.12, round down to 15 driven gear teeth and that is as close as you can get to accurate.
Or, if your road speed is 50 and the speedo reads 58 which is 8mph too fast would also be a 16% error. Again, if your speedo driven gear is 18 teeth, then multiply 18 x 1.16 to find 20.88. Round up to 21. If a 21 is available it would be the closest to correct.
If the 21 is not available, then you will need to change the output shaft to the next lower tooth count. As a guess, a 7 tooth drive would probably be the right range for available gears and if your tire is tall enough, you might get away with an 8 tooth drive output shaft.
I've seen up to a 23 tooth gear, but the teeth are so thin, they have a shorter life.