For every sizing rule of thumb, there's at least one rider for whom it doesn't work. But for figuring out where to start your search, I've always found Dave Moulton's guidelines useful:
"If you are 5’ 3” to 5’ 5” frame size equals Height divide by 3.3. For people 5’ 6” to 5’ 10” frame size = Height divide by 3.2 and if you are 5’ 11” to 6’ 4” frame size = Height divide by 3.1. -- Dave Moulton"
This gives you frame size in terms of "effective" seat tube (how long the seat tube would be if the bike had a perfectly horizontal top tube). Mountain bikes, hybrids, and some road bikes with sloping top tubes may tell you the "actual" (considerably shorter) seat tube length, so you'll need to adjust accordingly. If you can't easily determine effective seat tube length for a given bike, but they do list effective top tube length (also sometimes listed as reach), add 10cm and use that as the target top tube size.
Lots of people will now tell you the multitude of ways this is wrong and how they're comfortably riding a frame size much larger/smaller than this suggests

But the idea is use this as your starting point. Try a bike in the size this method suggests and see how it feels. If it feels too big or too small then you know you're an outlier and you need to go up or down a size. But chances are that it will get you close enough that you can get a good fit with normal saddle and bar adjustments.