How the math works
WoW publishes a fixed XP cost per level. This calculator sums the real per-level costs from your current level to your target (levels 1-80 from Wowpedia's XP table, levels 80-90 from a 2026 Midnight leveling guide), then divides by your XP per hour: hours = total XP remaining / XP per hour. The current cap is level 90 with the Midnight expansion.
The two XP eras
Levels 70-80 (The War Within) need about 1.5 to 1.7 million XP per level, while Midnight's 80-90 stretch was re-tuned to roughly 400,000 to 593,000 XP per level, for a total of 4,963,065 XP from 80 to 90. That makes the final stretch much faster per level than the one before it.
Worked example
Level 80 to 90 at 500,000 XP per hour: XP remaining = 4,963,065, levels remaining = 10, hours = 4,963,065 / 500,000 = 9.9 hours. At 3 hours a night, that is about three evenings to the cap.
Speed it up
Your XP per hour is the whole game. War Mode, rested XP, Darkmoon Faire buffs, and the Warband mentored leveling bonus (up to 25% with max-level characters) all raise it. Time one hour of your usual route, enter the real number, and the estimate stops being a guess.