Rectangle Calculator

Enter two facts about a rectangle (sides, diagonal, area or perimeter) and get the rest, including the diagonal and aspect ratio.

Length (l)
8 ft
Width (w)
5 ft
Area (A)
40 ft2
Perimeter (P)
26 ft
Diagonal (d)
9.433981 ft
Diagonal angle to length
32.0054°0.558599 rad
Aspect ratio
1.6 : 1
Circumscribed circle radius
4.716991 ft
Area40 ft2

Show the work

  1. Area: A = l × w = 8 × 5 = 40 ft2
  2. Perimeter: P = 2(l + w) = 2 × (8 + 5) = 26 ft
  3. Diagonal: d = √(l2 + w2) = √(82 + 52) = 9.433981 ft
l = 8w = 5d = 9.434units: ft

A rectangle has four right angles and opposite sides of equal length, so any two independent measurements pin it down completely. That is why rooms, screens, garden beds, sheets of plywood and sheets of paper are all described by two numbers. This rectangle calculator accepts length and width, or the length together with the diagonal, area or perimeter, or the area and perimeter with no side at all, and fills in everything else.

How to use the rectangle calculator

  1. In I know the, pick Length and width, Length and diagonal, Length and area, Length and perimeter, or Area and perimeter.
  2. Enter the values in the fields that appear. Area is in square units; the other inputs are lengths.
  3. Choose the Units (feet by default).
  4. Read the headline: the area when you entered both sides, the width when you entered the length plus something else, and Length × width when you started from area and perimeter. Every mode also lists the perimeter, the diagonal, the angle the diagonal makes with the length, the aspect ratio and the radius of the circle through all four corners (half the diagonal).

Rectangle formulas

A = l × w  ·  P = 2(l + w)  ·  d = √(l2 + w2)

Rearranged for the missing width:

You know Width
Length and diagonal w = √(d² − l²)
Length and area w = A ÷ l
Length and perimeter w = P ÷ 2 − l
Area and perimeter roots of x² − (P/2)x + A = 0

Worked example: a bedroom floor

A bedroom measures 13 ft 6 in by 11 ft. How much flooring and baseboard does it need?

  • Choose Length and width, enter 13.5 (13 ft 6 in) and 11, and keep the units in feet.
  • Area: 13.5 × 11 = 148.5 ft². Adding 10% for cuts and waste, order about 163 ft² of flooring.
  • Perimeter: 2 × (13.5 + 11) = 49 ft of baseboard, minus the width of each doorway.
  • Diagonal: √(13.5² + 11²) ≈ 17.41 ft, the longest straight board or rug that will lie flat on the floor.

The area–perimeter trade-off

A fixed perimeter does not fix the area. Here are four rectangles that each take exactly 60 ft of fencing:

Length × width Area
15 × 15 ft 225 ft²
20 × 10 ft 200 ft²
25 × 5 ft 125 ft²
28 × 2 ft 56 ft²

The identity behind the table is l × w = ((l + w) ÷ 2)² − ((l − w) ÷ 2)². With the perimeter fixed, the first term is fixed too, so every bit of difference between length and width is subtracted from the area. The square, with no difference at all, encloses the most. Turned around, the square needs the least fencing or trim for a given area. The Area and perimeter mode uses the same algebra, and when you ask for more area than (P/4)² it reports the largest area that perimeter can hold.

Screens: same diagonal, different area

TVs and monitors are sold by the diagonal, which hides how much picture you get. For a diagonal d and aspect ratio a:b, the width is d × a ÷ √(a² + b²). For a 55-inch screen:

Aspect ratio Width Height Screen area
16:9 47.94 in 26.96 in 1,293 in²
4:3 44 in 33 in 1,452 in²
1:1 38.89 in 38.89 in 1,512.5 in²

The wider the format, the less area per inch of diagonal. To check a real screen, measure its width and use Length and diagonal.

Checking corners with the diagonals

Builders square up deck frames and foundation forms by comparing diagonals. A 16 × 12 ft frame should measure exactly 20 ft corner to corner, a scaled-up 3-4-5 triangle. The calculator also gives the diagonal’s angle to the length, 36.87° here, which helps when laying out and cutting a diagonal brace.

For a square, use the square calculator. If the corners are not 90°, the parallelogram calculator applies. The Pythagorean theorem calculator works on any right triangle.

Frequently asked questions

How do I find the area and perimeter of a rectangle?

Multiply length by width for the area. For the perimeter, add length and width and double the sum. A 13.5 ft by 11 ft room has an area of 148.5 ft² and a perimeter of 49 ft.

How do I find the width if I know the length and the diagonal?

The diagonal is the hypotenuse of a right triangle whose legs are the two sides, so w = √(d² − l²). A screen 44 in wide with a 55 in diagonal is √(55² − 44²) = 33 in tall.

Can I find the length and width from the area and perimeter alone?

Yes, if such a rectangle exists. The two sides are the roots of x² − (P/2)x + A = 0, so 200 ft² with a 60 ft perimeter gives 20 ft by 10 ft. If the area is larger than (P/4)², no rectangle fits and the calculator tells you the largest area that perimeter can enclose.

Which rectangle encloses the most area for a given perimeter?

A square. With 60 ft of fencing, a 15 × 15 ft square encloses 225 ft², a 20 × 10 ft rectangle 200 ft², and a 25 × 5 ft rectangle only 125 ft².

How do I check that a frame has square corners?

Measure both diagonals. In a true rectangle they are equal. If one is longer, push the two corners at the ends of the longer diagonal toward each other until both measurements match.

Last reviewed October 2026 by the CalcFluent editorial team. How we check our calculators.