Rectangle Calculator

Enter the length and width—or any two known rectangle measurements—to calculate area, perimeter, diagonal and missing sides.

Enter rectangle measurements

Rectangle measurement diagram A rectangle with its longer side labelled length, shorter side labelled width and a dashed diagonal. Length (L) Width (W) Diagonal (d)
Usually the longer side
Usually the shorter side
Use other known values

Enter a supported independent pair. You may add extra values to check whether they agree.

A = L × W
P = 2 × (L + W)
d = √(L² + W²)
R = d ÷ 2; not independent of d
From 0 to 10

Use one unit: enter every length in the selected unit. Changing this selector changes the labels only; it does not convert values already entered. Area is reported in square units.

Supported pairs: length + width; one side + area, perimeter, diagonal or circumradius; perimeter + area; perimeter + diagonal or circumradius; and diagonal or circumradius + area. Diagonal + circumradius is dependent and cannot determine the sides.

Live solution

Enter length and width, or open “Use other known values” and enter a supported pair.

Advertisement

Practical rectangle examples

Flooring: area, edge and diagonal

A 5 m by 3 m floor has area 5 × 3 = 15 m², perimeter 2 × (5 + 3) = 16 m, and diagonal √(5² + 3²) = 5.83 m.

Fencing: find the missing length

A 20 m² plot with a 4 m width has length 20 m² ÷ 4 m = 5 m. Its fence line is 2 × (5 + 4) = 18 m.

Panel fit: diagonal and one side

A panel with a 13 in diagonal and 5 in side has the other side √(13² − 5²) = 12 in, so it needs a 12 in by 5 in opening.

Rectangle formulas

Let L be one side, W the other side, A area, P perimeter, d diagonal and R circumradius. Results label the longer solved side as length and the shorter as width; rotating a rectangle swaps the side directions without changing its properties.

Core formulas
What you knowWhat you needFormulaValidity condition
Length L and width WAreaA = L × WL > 0 and W > 0
Length L and width WPerimeterP = 2(L + W)L > 0 and W > 0
Length L and width WDiagonald = √(L² + W²)L > 0 and W > 0
Area A and width WLengthL = A ÷ WA > 0 and W > 0
Diagonal d and one side WOther sideL = √(d² − W²)d > W > 0
Advanced formulas
What you knowWhat you needFormulaValidity condition
Perimeter P and area ABoth sidesS = P/2; L,W = (S ± √(S² − 4A))/20 < A ≤ P²/16
Perimeter P and diagonal dBoth sidesA = ((P/2)² − d²)/2, then use P and AP/(2√2) ≤ d < P/2
Diagonal d and area ABoth sidesS = √(d² + 2A); solve t² − St + A = 00 < A ≤ d²/2
Diagonal dCircumradiusR = d/2d and R are dependent, so together they do not determine the sides

Circle and diagonal accuracy: a rectangle’s equal diagonals bisect each other, but equal diagonals alone do not prove that an arbitrary quadrilateral has right angles. Every rectangle has a circumscribed circle with radius d/2. A general rectangle does not have an incircle tangent to all four sides unless it is a square; this calculator instead reports the radius of the largest circle that fits inside, equal to half the shorter side.

Methodology and review

Built and checked by:
Starlight Tools editorial team

Mathematical review:
Elementary Euclidean geometry, Pythagorean and quadratic formulas

Numerical policy:
Calculations use full browser precision. Extra values agree when their difference is within a relative tolerance of 1 × 10−9, with a 1 × 10−12 absolute floor. Rounding is applied only for display.

Last reviewed:

All calculations run locally in your browser. If you suspect a calculation issue, include the values, unit and expected result when contacting Starlight Tools.

Rectangle calculator questions

How do you find a rectangle’s area, perimeter and diagonal?

For length L and width W, area is L × W, perimeter is 2 × (L + W), and diagonal is √(L² + W²). For a 5 m by 3 m rectangle, the area is 15 m², the perimeter is 16 m, and the diagonal is approximately 5.83 m.

How do you find length from area and width?

Divide the area by the width: L = A ÷ W. If the area is 20 m² and the width is 4 m, the length is 20 m² ÷ 4 m = 5 m.

Does area alone determine a rectangle’s perimeter?

No. Rectangles can have the same area but different side lengths and perimeters. An area of 24 m² could be 6 m by 4 m with a 20 m perimeter, or 8 m by 3 m with a 22 m perimeter.

Does the diagonal alone determine the sides of a rectangle?

No. Many rectangles can share one diagonal length. You also need a side, the area, or the perimeter. Diagonal and circumradius are dependent because the circumradius is always half the diagonal, so that pair does not uniquely define a rectangle.

How do units affect rectangle area?

Length, width, diagonal and perimeter use linear units, while area uses square units. If length and width are entered in metres, area is in square metres (m²). Convert all entered lengths to the same selected unit before calculating.

What is the difference between a rectangle and a square?

A rectangle has four right angles and opposite sides equal. A square is a special rectangle whose four sides are all equal. Every square is a rectangle, but not every rectangle is a square.

Explore more tools