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.
Length × Width = square units
- 1
Square the length
8² = 64 - 2
Square the width
5² = 25 - 3
Diagonal = √(L² + W²)
√(64 + 25) = 9.434Pythagorean theorem applied to the rectangle's corner triangle. - 4
Area = L × W
8 × 5 = 40
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
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.
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
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.
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
@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?
