Enter the length and width—or any two known rectangle measurements—to calculate area, perimeter, diagonal and missing sides.
Enter rectangle measurements
Live solution
Enter length and width, or open “Use other known values” and enter a supported pair.
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 know
What you need
Formula
Validity condition
Length L and width W
Area
A = L × W
L > 0 and W > 0
Length L and width W
Perimeter
P = 2(L + W)
L > 0 and W > 0
Length L and width W
Diagonal
d = √(L² + W²)
L > 0 and W > 0
Area A and width W
Length
L = A ÷ W
A > 0 and W > 0
Diagonal d and one side W
Other side
L = √(d² − W²)
d > W > 0
Advanced formulas
What you know
What you need
Formula
Validity condition
Perimeter P and area A
Both sides
S = P/2; L,W = (S ± √(S² − 4A))/2
0 < A ≤ P²/16
Perimeter P and diagonal d
Both sides
A = ((P/2)² − d²)/2, then use P and A
P/(2√2) ≤ d < P/2
Diagonal d and area A
Both sides
S = √(d² + 2A); solve t² − St + A = 0
0 < A ≤ d²/2
Diagonal d
Circumradius
R = d/2
d 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.