How many teeth?

if its not the speedo gear, or a ratio adapter scabbed on there, it's possible the clock spring in the speedo ***'y is broken or some other type of internal failure of the gauge itself.

I have to agree.
40 mph off isn’t something a gear change is going to fix.
Something is wrong with the speedo head.