Length and Width of Rectangle Given Perimeter Calculator
Given a rectangle's perimeter and one side (the length), this calculator finds the width using the perimeter formula P = 2L + 2W, then also computes the area, diagonal, and half-perimeter — with an animated diagram and step-by-step solution.
The other dimension: W = P/2 − L
Formula: P = 2L + 2W → L + W = P / 2
Solve for W
Area = L × W
- 1
Half-perimeter = P ÷ 2
24 ÷ 2 = 12From P = 2L + 2W → L + W = P ÷ 2. - 2
Width = half-perimeter − length
12 − 8 = 4
How does this calculator work?
Given perimeter P and length L, width W = P/2 − L. Area = L × W and diagonal = √(L² + W²). For example, P = 24 and L = 8 gives W = 4, area = 32, and diagonal ≈ 8.94. Length must be less than P/2 for a valid (positive) width.
Formula
How this is calculated
The perimeter of a rectangle is the total length of all four sides: P = 2L + 2W (two lengths plus two widths). If you know both P and L, you can rearrange to find W: first divide the perimeter by 2 to get the half-perimeter (L + W = P/2), then subtract L to isolate W.
For a valid rectangle, the length must be strictly less than half the perimeter — otherwise the computed width would be zero or negative, which is geometrically impossible. A square is the special case where L = W = P/4.
Once both dimensions are known, area and diagonal follow directly: Area = L × W and Diagonal = √(L² + W²) by the Pythagorean theorem. These are useful for flooring, fencing, gardening plots, room layouts, and any geometry problem that gives you the perimeter and one side.
Frequently asked questions
You need a second piece of information — either the length, the width, the area, the diagonal, or the aspect ratio — to uniquely determine both dimensions. Knowing only the perimeter leaves infinitely many rectangles with that perimeter (from a very thin sliver to an almost-square).
Use P = 2(L + W). For example, a rectangle 8 × 4 has P = 2 × (8 + 4) = 24. This calculator works the inverse: given P = 24 and L = 8, it finds W = 24/2 − 8 = 4.
Yes — that gives a square. If L = P/4, then W = P/2 − P/4 = P/4 = L. A square is a special rectangle where all four sides are equal.
TG we-Calculate Editorial Team. (2026). Length and Width of Rectangle Given Perimeter Calculator [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/length-and-width-of-rectangle-given-perimeter-calculator
TG we-Calculate Editorial Team. "Length and Width of Rectangle Given Perimeter Calculator." TG we-Calculate. 2026. https://we-calculate.com/calculator/length-and-width-of-rectangle-given-perimeter-calculator.
TG we-Calculate Editorial Team, "Length and Width of Rectangle Given Perimeter Calculator," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/length-and-width-of-rectangle-given-perimeter-calculator
@misc{wecalculate_length_and_width_of_rectangle_given_perimeter_calculator, title = {Length and Width of Rectangle Given Perimeter Calculator}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/length-and-width-of-rectangle-given-perimeter-calculator}}, year = {2026}, note = {TG we-Calculate} }
Did this calculator help you?
