Education

Rectangle Calculator

Last updated: June 19, 2026

Blake Boege
Written by Blake Boege · Founder, Calculator Answers

A rectangle calculator is a geometric utility that computes the area, perimeter, and diagonal length of a rectangle from its basic dimensions. Using standard mathematical formulas, the calculator determines the surface coverage (area equals width times length), boundary length (perimeter equals two times the sum of width and length), and the distance between opposite corners using the Pythagorean theorem. Students, designers, and builders use this tool to calculate spaces, measure materials, and solve geometric problems.

Enter length and width and the calculator returns the area, perimeter, diagonal, and simplified aspect ratio of the rectangle.

Quick Answer

Calculate the area, perimeter, and diagonal of a rectangle. Enter the length and width to find geometric properties with step-by-step formulas.

Use any consistent unit. · e.g. 8

Same unit as length. · e.g. 5

Length and width must be positive. Results use whatever unit you entered (area is unit squared, perimeter and diagonal are the same unit).

Rectangle

Area

40

8 × 5 = 40 sq units

Length8
Width5
Area40
Perimeter26
Diagonal9.434
Aspect ratio8 : 5

Area = length × width · Perimeter = 2 × (length + width) · Diagonal = √(length² + width²).

Was this helpful?

Examples

8 by 5 rectangle

area 40 · perimeter 26 · diagonal ≈ 9.434

16 by 9 rectangle

area 144 · perimeter 50 · diagonal ≈ 18.358 · ratio 16 : 9

10 by 10 square

area 100 · perimeter 40 · diagonal ≈ 14.142

How it works

A rectangle has four right angles and two pairs of equal sides. Three single-line formulas cover everything you can measure without knowing the angles: area, perimeter, and diagonal.

Area · A = length × width

Perimeter · P = 2 × (length + width)

Diagonal · d = √(length² + width²)

Results use whatever unit you entered (area is squared).

Related geometry calculators

Frequently asked questions

Multiply the length by the width. For a rectangle that is 8 units long and 5 units wide, the area is 8 × 5 = 40 square units. Area is always expressed in squared units, since you are multiplying two length measurements.

Add up all four sides, or use the shortcut formula P = 2 × (length + width). For an 8 by 5 rectangle, the perimeter is 2 × (8 + 5) = 26 units. Perimeter uses the same unit as length and width, not squared.

The diagonal is the hypotenuse of a right triangle with legs equal to the length and width. By the Pythagorean theorem, diagonal = √(length² + width²). For an 8 by 5 rectangle, the diagonal is √(64 + 25) = √89 ≈ 9.434 units.

Aspect ratio expresses how the length compares to the width. The calculator shows the simplified whole-number ratio when both dimensions are integers (for example 16 : 9, 4 : 3, 5 : 4), and the decimal value otherwise (for example 1.778 : 1). Aspect ratio is common in screens, photographs, and printed paper.

Whatever unit you used for length and width. If you entered inches, area is in square inches, perimeter and diagonal are in inches. The calculator is unit-agnostic: enter consistent values and the answers come out in the same unit family.

Yes. A square is just a rectangle with equal length and width, so enter the same value in both fields. Area becomes s², perimeter becomes 4s, and the diagonal is s × √2 ≈ 1.414s.