Length and Width of a Rectangle from the Perimeter
Test cases replayed : 4 of 4 match · Methodology · No outside source listed
A perimeter alone fits many rectangles, so add one more fact: the area, the ratio of the sides, or one side.
Result
Length (length units)
Width (length units)
- Area (square units)
- Diagonal (length units)
- Largest area possible with this perimeter (a square)
Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.
This browser did not allow copying. The sentence is in the box below, already selected: copy it with your keyboard or the menu.
How to use this calculator
Fill in the fields in this order; each step takes you to its field.
- Besides the perimeter, I know: choose The area, The ratio length ÷ width or The length.
- Perimeter (length units): enter 0 or more.
- Area (square units; first choice): enter 0 or more.
- Ratio length ÷ width (second choice, e.g. 2 for 2:1): enter 0 or more.
- Length (length units; third choice): enter 0 or more.
- Read the result: Length (length units); the panel also shows Width (length units), Area (square units), Diagonal (length units) and Largest area possible with this perimeter (a square).
How this calculator works
Perimeter P = 2(L + W), so L + W = P ÷ 2. With the area A = L × W as well, L and W are the two roots of t² − (P/2)t + A = 0: L = (P/2 + √(P²/4 − 4A)) ÷ 2 and W = P/2 − L.
With a ratio r = L ÷ W, W = P ÷ (2(1 + r)) and L = r × W. With one side, the other is P ÷ 2 minus that side.
Of all rectangles with the same perimeter, the square has the largest area, P² ÷ 16. A larger area than that is impossible and shows a dash.
The formula
| Symbol | Meaning | Unit |
|---|---|---|
| Besides the perimeter, I know (1: The area; 2: The ratio length ÷ width; 3: The length) | ||
| Perimeter | length units | |
| Area (first choice) | square units | |
| Ratio length ÷ width (second choice, e.g. 2 for 2:1) | ||
| Length (third choice) | length units | |
| Length | length units |
Worked example
| Besides the perimeter, I know | The area |
|---|---|
| Perimeter (length units) | 20 |
| Area (square units; first choice) | 21 |
| Width (length units) | 3 |
|---|---|
| Area (square units) | 21 |
| Diagonal (length units) | 7.6158 |
| Largest area possible with this perimeter (a square) | 25 |
Length (length units) 7
Each step uses the unrounded value of the step before it; figures on this page are rounded for display.
Frequently asked questions
A rectangle has a perimeter of 20 and an area of 21. What are its sides?
L + W = 10 and L × W = 21, so the sides are 7 and 3.
A rectangle's perimeter is 30 and it is twice as long as it is wide. What are its sides?
The width is 30 ÷ (2 × 3) = 5 and the length is 10, for an area of 50.