There's something called a Karvonnen heart rate calculator that also takes your resting heart rate (RHR) into account. The idea is that, as you get more fit, your heart gets more efficient (meaning you have more ‘reserve’ at any particular BPM) which is shown by a lower RHR — and the calculator shows something a little closer than a simple ‘by age’.
BTW, by RHR, I’m pretty sure they mean the “sitting still for a few minutes, not talking” rate — not the one when you’re asleep.