I'm sure Bacciagalupe's math is spot on
When climbing a steep hill for hours on end - that dang hill up Death Valley to Towne's Pass came to mind

- I start off in a higher gear, then shift down the tireder I get, shift up one gear and stand on the pedals for a while, shift down and sit down again :repeat: As the day wears on the gears get smaller and smaller... At last I take micro breaks and start off refreshed with a higher gear - for a while :repeat:
My speed (and cadence) is probably very erratic, a bit faster standing up (higher cadence sitting down?)... but all the time I'm shifting gears, adjusting my position, resting, to an inner voice that is telling me how best (for MY legs) to get to the top of the dang hill

fwiw my granny is 22/28 and very very occasionally I'm so knackered that I wish it was even lower... Rambling point being, I'm not considering the math involved, just trying to get up the hill