Math

Rectangle Calculator

Calculate area, perimeter, and diagonal of any rectangle from length and width. Results update instantly.

Enter length and width to see the result.

Advertisement

Rectangle Formulas

Three key measurements can be derived from any rectangle given its length (l) and width (w).

Area = l × w

Perimeter = 2 × (l + w)

Diagonal = √(l² + w²)

Rectangles as Building Blocks

The rectangle is the most fundamental shape in applied geometry. Its right angles and parallel sides make it predictable, stackable, and easy to measure. Most man-made structures are based on rectangular grids: rooms, buildings, cities, and circuit boards all rely on rectangular organisation.

More complex shapes can often be decomposed into rectangles for area calculations. An L-shaped room, for instance, is computed by splitting it into two rectangles and summing their areas. This decomposition principle — breaking complex shapes into simple rectangular components — underlies much of practical geometry and numerical integration (Riemann sums).

The aspect ratio (l/w) of a rectangle conveys important information without needing to know the actual dimensions. Screens, films, and photography use standardised aspect ratios: 4:3 for classic TV, 16:9 for widescreen, 3:2 for digital cameras. The aspect ratio determines how an image will appear when displayed or printed.

Frequently asked questions

How do you calculate the area of a rectangle?
The area of a rectangle is calculated by multiplying its length by its width: A = l × w. The result is expressed in square units. For example, a rectangle with a length of 8 metres and width of 5 metres has an area of 40 square metres. The area formula is one of the most fundamental in mathematics and forms the basis for area calculations of more complex shapes, many of which are decomposed into rectangles.
What is the perimeter of a rectangle?
The perimeter of a rectangle is the total distance around its outer boundary. It equals twice the sum of length and width: P = 2 × (l + w). This is because a rectangle has two pairs of equal parallel sides — two sides of length l and two sides of length w. For a rectangle 8 m × 5 m, the perimeter is 2 × (8 + 5) = 26 m. Perimeter is used when calculating fencing, framing, or border materials.
How do you find the diagonal of a rectangle?
The diagonal of a rectangle is the straight-line distance between two opposite corners. Using the Pythagorean theorem, the diagonal d = √(l² + w²), where l and w are the length and width. This works because a diagonal of a rectangle divides it into two right triangles with legs l and w and hypotenuse d. For a rectangle 3 × 4, the diagonal is √(9 + 16) = √25 = 5.
What is the difference between a rectangle and a square?
A square is a special case of a rectangle where all four sides have equal length. A rectangle is defined as a quadrilateral with four right angles; a square additionally requires all four sides to be equal. This means every square is a rectangle, but not every rectangle is a square. In terms of formulas, for a square with side s: area = s², perimeter = 4s, and diagonal = s√2.
How is rectangle geometry used in everyday life?
Rectangle calculations are among the most commonly applied in everyday life. Flooring and tiling require area calculations to determine how many tiles are needed. Fencing a garden requires perimeter calculations. Hanging a picture frame requires knowing whether the diagonal fits within a space. Room dimensions, screen sizes, and land measurements are all described as rectangular areas in practice. Aspect ratios like 16:9 describe the ratio of a rectangle's length to width.
What is the golden rectangle and why is it special?
The golden rectangle has a length-to-width ratio equal to the golden ratio φ ≈ 1.618. When you remove a square from one end of a golden rectangle, the remaining piece is also a golden rectangle — this self-similar property can be repeated infinitely, generating the golden spiral. The golden rectangle appears in classical architecture including the Parthenon, in Renaissance art, and in natural patterns including the arrangement of seeds in sunflowers and the proportions of nautilus shells.