Formula and method for finding the length of a rectangle
A rectangle has two pairs of equal, parallel sides — a length (usually the longer side) and a width (usually the shorter side). If you already know the width and one other measurement — the area, the perimeter, or the diagonal — you can solve for the missing length algebraically. This calculator supports all three starting points.
How the calculation works
Each method rearranges a standard rectangle formula to isolate length (L), given width (W):
- From area: Area is A = L × W, so L = A ÷ W. A 24 ft² rectangle that is 4 ft wide has a length of 24 ÷ 4 = 6 ft.
- From perimeter: Perimeter is P = 2(L + W), so L = P ÷ 2 − W. A rectangle with a 20 ft perimeter and 4 ft width has a length of 20 ÷ 2 − 4 = 6 ft.
- From diagonal: By the Pythagorean theorem, the diagonal d satisfies d² = L² + W², so L = √(d² − W²). A rectangle with a 7.211 ft diagonal and 4 ft width has a length of √(7.211² − 4²) ≈ 6 ft.
Once the length is known, the calculator also reports the resulting area (L × W), perimeter (2(L + W)), and diagonal (√(L² + W²)) so you can double-check the full set of dimensions.
Common mistakes
- Mixing units: enter the area, perimeter, or diagonal and the width in the same unit system — convert inches to feet, or centimeters to meters, before calculating.
- Forgetting the divide-by-2 on perimeter: the perimeter formula is P = 2(L + W), not L + W, so you must halve the perimeter before subtracting the width.
- Confusing the diagonal with a side: the diagonal is always longer than either the length or the width; do not use it directly as one of the side lengths.
Real-world applications
- Room and floor plans, where you know the area a room must cover and one wall's width, and need the other wall's length.
- Fencing and framing projects, where the total perimeter of material is fixed and you need to lay out the remaining side.
- Furniture, screens, and openings, where the diagonal measurement (easy to measure with a tape) and one side are known and you need the other side.
- Land surveying and construction layout, where dimensions are cross-checked using more than one known measurement.