A thermostat is a switch that reads temperature. When it reads the wrong thing, the water tells you.
The measurement
Run the nearest hot tap for a minute and take the temperature. Do it after the unit has finished a heating cycle, not during one.
Compare that reading with the dial. A few degrees of difference is normal. A wide gap, or a number that moves between draws, is not.
Three readings, three causes
Above the setting. Mineral on the sensing bulb insulates it, so it reports a temperature lower than the water's and the tank overheats. With hardness near 9 grains, this is the common one.
Below the setting. A control that has drifted, a lower element that has stopped, or a mixing valve blending cold into the outlet.
Swings hot and cold. The upper and lower controls are out of step, or one element is intermittent.
High-limit trips
A control that lets the tank overheat will eventually open the high-limit cutout. Reset it only once the cause is understood. Repeated resets are treating a symptom.
Two controls, one tank
An electric tank has an upper and a lower thermostat, and the upper hands off once the top is satisfied. A failed upper gives hot water at the top and cold at the bottom, which is the "one good shower" complaint.
Gas units
The thermostat is not separate. It lives inside the gas control, and the repair is a valve assembly matched to the model and fuel.
After the replacement
Set the temperature, run a full cycle, measure at the tap again, and confirm the relief valve reseats and the high limit stays set.
What we cover
Calibration checks, thermostat and control replacement, high-limit diagnosis, mixing valve assessment, and gas control replacement when the unit is gas.