Skip to content
FiftyCalc Free calculators for all 50 states

Rectangle Dimensions Calculator

Test cases replayed : 3 of 3 match · Methodology · No outside source listed

Enter the area and the perimeter of a rectangle; the calculator finds the two side lengths.

Result

Sample figures

Length (length units)—

Width (length units) —

  • (P ÷ 2)² − 4A (must not be negative)—
  • Diagonal √(l² + w²) (length units)—

Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.

Rectangle Dimensions Calculator

Area (square units): enter 0 or more. Prefilled example: 24.

Perimeter (length units): enter 0 or more. Prefilled example: 20.

How to use this calculator

Fill in the fields in this order; each step takes you to its field.

  1. Area (square units): enter 0 or more.
  2. Perimeter (length units): enter 0 or more.
  3. Read the result: Length (length units); the panel also shows (P ÷ 2)² − 4A (must not be negative), Width (length units) and Diagonal √(l² + w²) (length units).

How this calculator works

With l + w = P ÷ 2 and l × w = A, the length and width are the two roots of t² − (P ÷ 2)·t + A = 0: l, w = (P ÷ 2 ± √((P ÷ 2)² − 4A)) ÷ 2.

No rectangle exists when (P ÷ 2)² − 4A is negative, because for a given perimeter the square has the largest area, P² ÷ 16. The diagonal is √(l² + w²).

The formula

  1. D=(P÷2)2−4×A
  2. L=P÷2+D2
Symbols used in the formula
SymbolMeaningUnit
AAreasquare units
PPerimeterlength units
D(P ÷ 2)² − 4A (must not be negative)
LLengthlength units

Worked example

Area (square units)24
Perimeter (length units)20
(P ÷ 2)² − 4A (must not be negative)4
Width (length units)4
Diagonal √(l² + w²) (length units)7.2111
  1. D=(20÷2)2−4×24=4
  2. L=20÷2+42=6

Length (length units) 6

Each step uses the unrounded value of the step before it; figures on this page are rounded for display.

Frequently asked questions

What are the sides of a rectangle with area 24 and perimeter 20?

6 and 4: they add up to 10 and multiply to 24; the diagonal is about 7.2111.

Can a rectangle have area 30 and perimeter 20?

No. With a perimeter of 20 the largest possible area is the 5 × 5 square, 25.

Questions answered

Related calculators