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

Been there done that. That's why I suggested just sticking any gear in there you could find that's close; then figure from there to refine it. Not trying to start another tire size/diameter free for all, but there's more to tire height than just tire size. The width of your wheel changes diameter, along with tire pressure. Also, that's why I suggested that you first find out EXACTLY how far off your speedometer actually is. At least now you're a lot closer, and you should be able to dial it in near perfect. Here's the real test tho; for instance, if your speedometer is off by 5mph at 25 mph, then it should be off by 10mph at 50mph...otherwise speedometer is bad. These gears can get expensive and it's time consuming to find them, order them, wait for them, install them...repeat process....not fun.