Rectangle Diagonal Calculator

Enter any two of length, width and diagonal to find the third, with the diagonal angle, step-by-step working and a scaled drawing. Switch to square mode for the shortcut d = s√2.

By the PythagoreanTheorem.net teamUpdated Free · no sign-up

Fill in any two boxes and leave the third empty: the calculator finds the missing length, width or diagonal. In square mode, enter either the side or the diagonal.

d = 15 ft

Exact answer.

  • Area108 ft²
  • Perimeter42 ft
  • Diagonal angle36.87°
  • Diagonals cross at73.74° and 106.26°
θw = 9 ftl = 12 ftd = 15 ft

Step-by-step solution

  1. The diagonal is the hypotenuse: d2 = l2 + w2
  2. Substitute: d2 = 122 + 92
  3. Square: d2 = 144 + 81
  4. Add: d2 = 225
  5. Take the square root: d = √225 = 15
  6. Angle with the length: θ = arctan(9 ÷ 12) ≈ 36.87°
Decimals (2.5), fractions (3/4) and roots (√2) all work. With feet or inches you also get the answer to the nearest 1/16 inch.

The diagonal of a rectangle is d = √l2 + w2: square the length, square the width, add them and take the square root. A diagonal splits a rectangle into two right triangles, so this is the Pythagorean theorem with the diagonal as the hypotenuse. A 12 ft by 9 ft room has a 15 ft diagonal.

How to use the diagonal calculator

  1. Choose the shape. Rectangle mode needs two of the three measurements. Square mode needs only one, because the length and the width are the same.
  2. Type the two values you know and leave the third box empty. Length and width give the diagonal; the diagonal and one side give the other side.
  3. Pick units and rounding. Both measurements must already be in the same unit. With feet or inches, the result also appears in feet, inches and sixteenths, ready for a tape measure.
  4. Read the results. You get the missing side (exact radical form when there is one), the area, the perimeter, the angle the diagonal makes with the length and the angles where the two diagonals cross.

The calculator always treats the two boxes you typed in most recently as the known values, so you can switch from "find the diagonal" to "find the width" just by typing in a different box. The address bar updates as you type, so you can copy the link to share a calculation.

The rectangle diagonal formula

Every corner of a rectangle is a right angle. Draw a diagonal and you cut the rectangle into two identical right triangles. In each one, the length l and the width w are the legs and the diagonal d is the hypotenuse, so

d2= l2 + w2d= √l2 + w2
wld d = √(l² + w²) 45° ssd d = s√2 ≈ 1.414 s
The diagonal is the hypotenuse of a right triangle whose legs are the length and the width. In a square the legs are equal, so the diagonal is always √2 times the side.

Rearranging the same equation gives the missing side when you know the diagonal:

l= √d2 − w2w= √d2 − l2

The diagonal is always longer than the length and longer than the width, but shorter than the two added together. If you enter a "diagonal" that is not the longest number, no rectangle is possible and the calculator tells you so. For a single right triangle with sides named a, b and c, the Pythagorean theorem calculator does the same job.

Diagonal of a square

For a square with side s, both legs equal s, so d2 = s2 + s2 = 2s2 and

d = s√2 ≈ 1.414 s

To go from the diagonal back to the side, divide by √2: s = d ÷ √2 ≈ 0.707 d. A 10 ft square patio has a diagonal of 10√2 ≈ 14.14 ft, and a square whose diagonal measures 10 in has sides of 10 ÷ √2 = 5√2 ≈ 7.07 in. Each half of a square is a 45-45-90 triangle, which is why the diagonal of a square always meets its sides at exactly 45°.

Worked examples

Example 1: the diagonal of a deck

A deck frame is 16 ft by 24 ft. How long should its diagonals measure?

d2= 162 + 242= 256 + 576 = 832d= √832 = 8√13≈ 28.84 ft

About 28.84 ft, which is 28 ft 10⅛ in to the nearest sixteenth. (√832 = 8√13 because 832 = 64 × 13; see the square root simplifier.) Both diagonals should read this length when the frame is square.

Example 2: a missing side

A rectangular picture frame is 50 cm wide and its diagonal is 130 cm. How long is it?

l2= 1302 − 502= 16,900 − 2,500 = 14,400l= √14,400 = 120 cm

The frame is 120 cm long. The sides 50, 120 and 130 are the 5-12-13 triangle scaled by 10.

Example 3: across a soccer field

A standard soccer field measures 105 m by 68 m. How far is it from one corner flag to the opposite one?

d2= 1052 + 682= 11,025 + 4,624= 15,649d= √15,649 ≈ 125.10 m

About 125.1 m. Running the diagonal saves about 48 m compared with running along two sides of the field (173 m).

Common rectangles and their diagonals

RectangleLength × widthDiagonal
US Letter paper11 × 8.5 in13.90 in
A4 paper297 × 210 mm363.74 mm
Sheet of plywood8 × 4 ft4√5 ≈ 8.94 ft
Bedroom12 × 10 ft15.62 ft
Square room12 × 12 ft12√2 ≈ 16.97 ft
Tennis court (doubles)78 × 36 ft85.91 ft
NBA basketball court94 × 50 ft106.47 ft
American football field with end zones360 × 160 ft393.95 ft
Soccer field (standard)105 × 68 m125.10 m

Screens are rectangles too, but they are sold by their diagonal, so you usually work backward from the diagonal and the aspect ratio. The screen size calculator does that for TVs, monitors and phones.

Checking that a corner is square

A four-sided frame with opposite sides equal is a parallelogram. It is a true rectangle, with four right angles, exactly when its two diagonals are equal. That gives builders a quick test that needs nothing but a tape measure: measure both diagonals and compare.

Square corners: diagonals equal 20 ft20 ft 16 ft12 ft Out of square: diagonals differ 20 ft 3 in19 ft 9 in 16 ft (slant exaggerated so you can see it)
Same four sides, different diagonals. When a frame is racked out of square, one diagonal grows and the other shrinks by about the same amount.

Here is the method for a 16 ft by 12 ft frame:

  1. Work out the target. √162 + 122 = √400 = 20 ft. (This frame is a 3-4-5 triangle scaled by 4, so the answer is a whole number.)
  2. Measure both diagonals from the same points on each corner, for example the outside corners, with the tape pulled tight.
  3. Compare. If one reads 20 ft 3 in and the other 19 ft 9 in, the frame is racked. Push the two corners at the ends of the long diagonal toward each other until both read the same.

Because racking lengthens one diagonal and shortens the other by almost the same amount, the correct length is very close to the average of your two readings: here (20 ft 3 in + 19 ft 9 in) ÷ 2 = 20 ft. The Pythagorean theorem in construction page covers this test and the 3-4-5 method for laying out decks, slabs and walls.

The diagonal angle and where the diagonals cross

The angle θ between the diagonal and the length comes from right-triangle trigonometry: the width is the side opposite θ and the length is the side next to it, so

θ = arctan(w over l)

For the 12 by 9 room in the calculator, θ = arctan(9 ÷ 12) ≈ 36.87°, and the diagonal makes the other angle, 90° − 36.87° = 53.13°, with the width.

The two diagonals of a rectangle are equal and cut each other in half, so they meet at the center and form two pairs of angles: 2θ and 180° − 2θ. For the 12 by 9 room these are about 73.74° and 106.26°. Only in a square do the diagonals cross at 90°. To find a diagonal through a box instead of across a flat rectangle, use the 3D Pythagorean theorem calculator, which applies the theorem twice: d = √l2 + w2 + h2.

Frequently asked questions

How do you find the diagonal of a rectangle?

Square the length and the width, add the two squares, then take the square root: d = √l2 + w2. For a 6 by 8 rectangle that is √36 + 64 = √100 = 10. It works because the diagonal is the hypotenuse of a right triangle whose legs are the two sides.

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

Subtract instead of adding: w = √d2 − l2. With a 13 in diagonal and a 12 in length, w = √169 − 144 = √25 = 5 in. The diagonal must be the larger number, otherwise the subtraction goes negative and no rectangle exists.

What is the diagonal of a square?

The side times √2, about 1.414 times the side. A square with 5 cm sides has a diagonal of 5√2 ≈ 7.07 cm. To go from the diagonal back to the side, divide by √2, or multiply by about 0.707.

Are both diagonals of a rectangle the same length?

Yes. Each diagonal is the hypotenuse of a right triangle with legs l and w, so both equal √l2 + w2. The reverse is also true for a parallelogram: if its diagonals are equal, its corners are right angles, which is why builders compare diagonals to check for square.

How do I turn a decimal answer like 28.84 ft into feet and inches?

Keep the whole feet (28), multiply the decimal part by 12 to get inches (0.844 × 12 ≈ 10.13 in), then multiply the leftover decimal by 16 to get sixteenths (0.13 × 16 ≈ 2, so 2/16 = 1/8). The answer is 28 ft 10⅛ in. Choose feet or inches as the unit and the calculator does this for you.

Keep exploring