Length Of A Rectangle Calculator

Calculate the length of a rectangle precisely — enter your dimensions and get the result with the formula shown.

Quick Facts

From area
L = A ÷ W
Length equals area divided by width.
From perimeter
L = P ÷ 2 − W
Since P = 2(L + W), solve for length by rearranging.
From diagonal
L = √(d² − W²)
Follows from the Pythagorean theorem: d² = L² + W².

Your Results

Calculated
Length
-
The rectangle's length
Area
-
A = L × W
Perimeter
-
P = 2(L + W)
Diagonal
-
d = √(L² + W²)

Ready

Choose a known quantity, enter the width, then press Calculate.

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.

Frequently Asked Questions

What is the formula to find the length of a rectangle from its area?
Divide the area by the width: L = A ÷ W. For example, a rectangle with an area of 24 ft² and a width of 4 ft has a length of 24 ÷ 4 = 6 ft.
How do I find the length of a rectangle from its perimeter and width?
Since perimeter P = 2(L + W), solve for length: L = P ÷ 2 − W. A rectangle with a 20 ft perimeter and a 4 ft width has a length of 20 ÷ 2 − 4 = 6 ft.
Can I find the length of a rectangle from its diagonal and width?
Yes. By the Pythagorean theorem, the diagonal d satisfies d² = L² + W², so L = √(d² − W²). A rectangle with a 7.211 ft diagonal and a 4 ft width has a length of about √(7.211² − 4²) ≈ 6 ft.
What is the difference between the length and width of a rectangle?
By convention, the length is the longer of the two side dimensions and the width is the shorter one, though the labels are sometimes swapped in casual use. What matters mathematically is that the two adjacent sides multiply to give the area and add (doubled) to give the perimeter, regardless of which one you call length.