Beginner

Dimensions of a Rectangle Calculator — Area, Perimeter, Diagonal

Enter the length and width of any rectangle — get the area, perimeter, diagonal length, aspect ratio and diagonal angle in one step.
Longer side (any unit — all outputs use the same unit)
Shorter side
Area
40

Length × Width = square units

Perimeter
26 units
Diagonal
9.434 units
Aspect ratio
1.6 : 1
Diagonal angle (to length)
32.01°
Length
8 units
Width
5 units
8 × 5Area = 40 sq units • Diagonal = 9.434
Step by step
  1. 1

    Square the length

    = 64
  2. 2

    Square the width

    = 25
  3. 3

    Diagonal = √(L² + W²)

    √(64 + 25) = 9.434
    Pythagorean theorem applied to the rectangle's corner triangle.
  4. 4

    Area = L × W

    8 × 5 = 40
Results are estimates for general information only and are not professional advice — always verify important results independently before relying on them. Read the full disclaimer.
Quick answer

How does this calculator work?

For a rectangle with length L and width W: Area = L × W, Perimeter = 2(L + W), Diagonal = √(L² + W²), Aspect ratio = longer ÷ shorter. Units cancel out — use any consistent unit. The diagonal angle to the length is arctan(W/L).

Formula
Area = L × W • Perimeter = 2(L + W) • Diagonal = √(L² + W²)
How this is calculated

A rectangle has four right angles and two pairs of equal parallel sides. Given the length L and width W, every other property follows from three simple formulas. The area is the product L × W — it tells you how many square units fit inside the rectangle. The perimeter is 2(L + W), the total distance around the boundary. The diagonal connects two opposite corners and by the Pythagorean theorem equals √(L² + W²).

The aspect ratio compares the longer side to the shorter: 16:9 (≈ 1.78:1) is a standard widescreen format, 4:3 (≈ 1.33:1) is a classic TV ratio, and 1:1 is a square. The diagonal angle reported is the angle the diagonal makes with the length, found from arctan(W / L). All outputs use whatever unit the inputs are in — centimetres, metres, inches, feet — since the formulas are dimensionless.

Note that this calculator assumes exact input values. For real-world construction or design, allow a small tolerance and verify measurements at both ends of a long wall or panel — rectangles that look square often have one side 1–2 mm off.

Frequently asked questions

From area A = L × W and perimeter P = 2(L + W), you get L + W = P/2 and L × W = A. These are the sum and product of L and W, so they are roots of the quadratic x² − (P/2)x + A = 0: x = (P/2 ± √((P/2)² − 4A)) / 2. The larger root is the length and the smaller is the width.

The diagonal is the hypotenuse of the right triangle formed by the length and width: diagonal = √(length² + width²). For example, a 3 × 4 rectangle has a diagonal of √(9 + 16) = √25 = 5.

The aspect ratio is the ratio of the longer side to the shorter side, often written as n:1. A 16 × 9 screen has aspect ratio 16/9 ≈ 1.78:1. A square has aspect ratio 1:1.

APA

TG we-Calculate Editorial Team. (2026). Dimensions of a Rectangle Calculator — Area, Perimeter, Diagonal [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/dimensions-of-a-rectangle-calculator

Chicago

TG we-Calculate Editorial Team. "Dimensions of a Rectangle Calculator — Area, Perimeter, Diagonal." TG we-Calculate. 2026. https://we-calculate.com/calculator/dimensions-of-a-rectangle-calculator.

IEEE

TG we-Calculate Editorial Team, "Dimensions of a Rectangle Calculator — Area, Perimeter, Diagonal," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/dimensions-of-a-rectangle-calculator

BibTeX

@misc{wecalculate_dimensions_of_a_rectangle_calculator, title = {Dimensions of a Rectangle Calculator — Area, Perimeter, Diagonal}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/dimensions-of-a-rectangle-calculator}}, year = {2026}, note = {TG we-Calculate} }

Did this calculator help you?