Saved

Press the star next to a tool's name to save it.

All my tools

Diagonal of Rectangle Calculator

Use this rectangle calculator to find the missing sides, area, perimeter, diagonal and diagonal angles of a rectangle or square from the values you know, including a golden rectangle.

Restored your last values ·

Choose what you know about the rectangle. The calculator finds the missing sides and gives the area, the perimeter, the diagonal and the ratio of the sides. For a golden rectangle, enter the longer side to get the shorter one.

Everything is worked out in your browser. Nothing you type is sent anywhere.

–

–

Choose what you know, fill in the boxes, then press Work out the rectangle.

See full result

A rectangle calculator finds the missing sides, the area, the perimeter and the diagonal of a rectangle from the values that you know. You can enter the length and the width, the perimeter and one side, the perimeter and the area, the diagonal and one side, or the area and one side. There is also a golden rectangle mode, a square mode, and the angles that the diagonals make. It uses the formulas on Wikipedia's pages on the rectangle and the golden rectangle, and it works in your browser. It covers the diagonal of a rectangle, the dimensions of a rectangle, the length of a rectangle and the length and width from a perimeter.

How to use the rectangle calculator

  1. Choose what you know from the list.
  2. Fill in the boxes that appear.
  3. Press Work out the rectangle.
  4. Read the length, the width, the area, the perimeter, the diagonal, the ratio and the diagonal angles.

The basic formulas

The Wikipedia page on the rectangle gives the area as the length times the width, the perimeter as 2 times the sum of the length and the width, and the diagonal as the square root of the length squared plus the width squared [1]. For a rectangle of 3 by 4, the area is 12, the perimeter is 14 and the diagonal is 5. These three formulas are the base of all the cases that the calculator handles.

The perimeter and one side

If you know the perimeter and the length, the width is half of the perimeter minus the length. A rectangle with a perimeter of 20 and a length of 7 has a width of 3. The calculator tells you if no rectangle is possible, for example when the length is more than half the perimeter, since the width would be zero or negative.

The perimeter and the area

If you know the perimeter and the area, the two sides are the roots of a quadratic equation. With half the perimeter s, the sides are the solutions of t squared minus s t plus the area equals 0. For a perimeter of 14 and an area of 12, half the perimeter is 7, and the sides are 4 and 3. If the area is too large for the perimeter, there is no real solution, since the square has the largest area for a given perimeter, and the calculator says that no rectangle fits.

The diagonal and one side

The diagonal and a side give the other side by the Pythagorean theorem: the width is the square root of the diagonal squared minus the length squared. A diagonal of 5 and a length of 3 give a width of 4. The diagonal must be longer than the side, or there is no rectangle.

The area and one side

The area and the width give the length by division. An area of 12 and a width of 4 give a length of 3. This is the simplest way to find the length of a rectangle when you know the area, as in the case of a room or a plot of land.

The golden rectangle

A golden rectangle is a rectangle whose sides are in the golden ratio. The Wikipedia page on the golden rectangle gives the ratio as phi, which is 1 plus the square root of 5, divided by 2, or about 1.618 [2]. The longer side divided by the shorter side is phi, and if you cut a square off the rectangle, the part that is left has the same ratio. Enter the longer side and the calculator gives the shorter one as the longer divided by phi. A longer side of 1.618 gives a shorter side of 1.

Worked examples

A garden bed has a perimeter of 30 meters and an area of 56 square meters. Half the perimeter is 15, and the sides are the roots of t squared minus 15 t plus 56, which are 8 and 7. A television screen has a diagonal of 50 inches and a width of 43.6 inches, so its height is about 24.5 inches. A room of 12 feet by 15 feet has an area of 180 square feet and a perimeter of 54 feet, with a diagonal of about 19.2 feet.

Squares and other special cases

A square is a rectangle with equal sides. If you enter a perimeter and an area, and the area equals the square of a quarter of the perimeter, you get a square, and the ratio of the sides is 1. The ratio that the calculator shows is the longer side divided by the shorter, which is 1 for a square, about 1.333 for a 4 by 3 screen and 1.618 for a golden rectangle.

Diagonal angles and the square

The two diagonals of a rectangle are equal and bisect each other [1]. Each diagonal makes an angle with the longer side equal to the arctangent of the shorter side divided by the longer one, and the two diagonals cross at twice that angle, the acute angle between them. The page does not give these angles, so they are our own right-triangle working. For a 4 by 3 rectangle the diagonal is 5, it makes 36.87° with the longer side, and the diagonals cross at 73.74°. A square gives 45° and 90°. In square mode, enter the side, or the diagonal: a diagonal of 10 gives a side of about 7.07, since the diagonal is the side times the square root of 2.

Common mistakes

  • Mixing up the perimeter and the area. The perimeter is a length, the area is a length squared.
  • Using half the perimeter as the sum. The sum of the two sides is half the perimeter.
  • Entering a diagonal that is too short. It must be longer than each side.
  • Using different units. Convert before you enter the numbers.

What next

Use this often? Add Diagonal of to your Home screen.

Frequently asked questions

What is a rectangle calculator?

A tool that finds the missing sides, the area, the perimeter and the diagonal of a rectangle from the values that you know.

How do you find the diagonal of a rectangle?

d = √(l² + w²). A 3 by 4 rectangle has a diagonal of 5.

How do you find the sides from the perimeter and the area?

They are the roots of t² − (P ÷ 2) × t + A = 0. A perimeter of 14 and an area of 12 give 4 and 3.

What is a golden rectangle?

A rectangle whose sides are in the golden ratio φ = (1 + √5) ÷ 2, about 1.618.

How do you find the length from the area?

Divide the area by the width.

What is the angle between the diagonals of a rectangle?

Twice the arctangent of the short side divided by the long side. A 4 by 3 rectangle gives 73.74°, and a square gives 90°.

What went wrong?

We only receive the reason you pick, never what you typed into the tool.

Thanks for your feedback.

More Math Tools