Area and Perimeter of a Rectangle

Calculates the area of a rectangle as height × width.

A rectangle is a quadrilateral with four right angles. Its two side lengths give you both the area and the perimeter.

S=abL=2(a+b)S = a b \qquad L = 2(a + b)

Example

With the defaults, a height of a=4a = 4 and a width of b=6b = 6:

S=4×6=24S = 4 \times 6 = 24

The perimeter adds one height and one width, then doubles the result:

L=2×(4+6)=20L = 2 \times (4 + 6) = 20

So the area is 24 and the perimeter is 20.

Why multiplying the sides works

Picture the rectangle as a grid of unit squares: 4 rows of 6 squares each. Counting them gives 4×6=244 \times 6 = 24 squares, and that count is the area.

Watch out

The perimeter does not determine the area. Among rectangles of perimeter 20 you can find 4 by 6 (area 24), 1 by 9 (area 9) and 5 by 5 (area 25). For a fixed perimeter, the closer the rectangle is to a square, the larger its area. Make sure both sides are given in the same unit.