Hot water capacity is not a single number. It is a calculation with four inputs, and any one of them can change the answer.
Input one: tank volume
A 40-gallon tank holds 40 gallons. How much of that is usable depends on the setpoint and the incoming water temperature.
Input two: incoming water temperature
In July, water enters at maybe 65 degrees. In January at this elevation, it is close to the outdoor temperature, which can be near freezing.
The tank has to lift it further, so each gallon of hot water costs more energy and the draw of cold water cools the tank faster.
That is why the same household runs out in winter and not in summer, with nothing broken.
Input three: the draw rate
A shower at 2 gallons a minute uses far less than one at 3.5. A low-flow head changes the arithmetic more than most people expect.
Two showers at once, plus a dishwasher, is a different load from the same fixtures used in sequence.
Input four: recovery
Once the tank is drawn down, the burner or element refills the heat. A scaled or failing unit recovers slowly, and the second shower starts with a half-warm tank.
At this hardness, scale is a slow cause. A failed lower element is a faster one.
The dip tube check
A broken dip tube lets cold water enter near the top, diluting the hot as it leaves. The symptom is hot water that fades quickly rather than running out cleanly.
What actually helps
Fix a failed element or dip tube, insulate the cold inlet run, lower the flow at the fixtures, then size the unit to the peak hour.
A larger tank on a slow-recovery system buys a minute, not a shower.
The honest measure
State what the current unit should deliver, then time it. The gap is the repair.