In the LP2954 datasheet, you may find basic 5V regulator circuit diagram. The circuit shows
the maximum power dissipated by the regulator which can be calculated
through the formula seen in the circuit instead of the present of
voltages and currents.
This calculation could be needed in a heatsink applications to determine if a heatsink is a required.
Complete design and detailed explanation on this Basic 5V Regulator Circuit Diagram can be seen in the LP2954 Datasheet (source: national.com)