Unrolling the side of a cylinder gives a rectangle. The lateral area is 2 × π × radius × height, and the total surface area adds the two circular ends: 2 × π × radius × (radius + height).
The surface of a cylinder is made of a curved side and two circular ends. Cut the side open and lay it flat and you get a rectangle whose height is and whose width is the circumference of the base, . That rectangle is the lateral area.
The total adds the two circular ends, , to the lateral area: .
With the defaults, and :
As a check, each end has area , so the two together are . Adding that to the lateral gives , which matches the total.
The lateral area is the curved side alone; the total surface area includes both flat ends. The label wrapped around a tin uses the lateral area, while painting the whole tin uses the total. A container with no lid needs one end, not two. Both the radius and the height must be positive.