How long will a 300 Wh power station run a wi-fi router + modem?

Short answer: about 21 hours. The math: 300 Wh rated × 0.85 inverter efficiency = 255 Wh delivered, ÷ 12 W average draw = 21.2 hours.

Runtime at a glance

Battery stateUsable energyRuntime
New battery255 Wh21 h
~2 years old (80%)204 Wh17 h
~4 years old (60%)153 Wh13 h
Size your full setup See current prices

Quick answers

Why multiply by 0.85?
Converting DC battery power to AC wall power loses roughly 15% in the inverter. Manufacturers quote the battery's rated Wh, not what reaches your appliance.
What shortens the runtime?
Battery age (−20% per ~2 years), cold weather, and the display/inverter idle draw on small loads. Treat 21 hours as a good-conditions estimate; plan on ~17 for an older unit.
What if I run other things at the same time?
Runtime divides across loads: add a 12 W router and the same battery lasts about 11 hours instead.