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

The speedometer itself is not operating correctly. It's not the gear in the transmission.
That's what I was afraid of...Thanks for your help. Appreciate it.