Almost everyone shops water heaters on tank size. Fifty gallons for a family, forty for a couple. It is a reasonable starting point and a bad decision rule, because gallons say nothing about how fast the unit makes more hot water.
The number that matters is the first-hour rating: how much hot water the heater can actually deliver in its busiest hour, combining what is stored with what it can recover. A 40-gallon gas unit with strong recovery often beats a 50-gallon electric in real use.
Size on peak demand, not on average demand. Count the fixtures that realistically run in your worst hour — two showers plus a dishwasher plus a laundry load is a normal Saturday morning in a full beach house, and it is the hour that determines whether anyone complains.
For rentals, add margin. Guests do not stagger their showers out of politeness. We size rental properties one step up on recovery, which costs a little more upfront and eliminates the single most common category of bad review.