This and it's come a long way in the last 10yrs but it's more dependent on hardware. Optimus still an issue with nvidia (3hrs) vs 630(5hrs) and have to switch between. However, just bought a pair of (used) x270's to travel with - one has Fedora and the other windows 10. Linux lasts 8-9 hours and the Windows about the same (maybe less).
Maxed out X250 had been reported to last 26h hours online, with plain debian install, no tricks like Macs' "oh, you look outside, I'll go to sleep now"