ThisCalculator

Math

Rectangle Diagonal Calculator: Formula and Examples

Updated · Standard formula, shown below

Diagonal 5.00 cm
Area
12.00 cm^2
Result
Perimeter
14.00 cm
Result
Length
3 cm
You entered

Rectangle Diagonal Calculator: Formula and Examples

Use this rectangle diagonal calculator to find the straight-line distance from one corner of a rectangle to the opposite corner. Enter the rectangle’s length and width in the same unit; the calculator returns the diagonal in that unit, along with its area and perimeter.

Formula

The diagonal is calculated with the Pythagorean theorem:

d = √(l² + w²)

  • d is the rectangle’s diagonal, in the same unit used for its sides.
  • l is the rectangle’s length.
  • w is its width.

A rectangle’s length and width meet at a right angle. They form the two shorter sides of a right triangle, while the diagonal is the triangle’s hypotenuse. The other calculator results are area = l × w and perimeter = 2(l + w).

Worked Example

For the default inputs, the rectangle is 3 cm long and 4 cm wide. Apply the diagonal formula:

  1. Square each side: 3² = 9 and 4² = 16.
  2. Add the squares: 9 + 16 = 25.
  3. Take the square root: √25 = 5 cm.

The diagonal is 5.00 cm. For these same inputs, the area is 3 × 4 = 12.00 cm², and the perimeter is 2 × (3 + 4) = 14.00 cm.

When to Calculate a Rectangle’s Diagonal

The diagonal is useful whenever the straight-line corner-to-corner distance matters. For example, it can help you check whether a rectangular object fits through an opening, estimate the corner-to-corner span of a screen, or verify that a frame is square. It is also useful in geometry when you know the side lengths but need the hypotenuse of the right triangle inside the rectangle.

For a physical object, measure its actual length and width across perpendicular sides. If you are checking whether it will fit through a doorway or into a space, the diagonal alone may not settle the question: the object’s thickness, orientation, clearance, and the shape of the opening can matter too.

How to Read and Check the Result

The diagonal is always longer than either individual side of a nonzero rectangle, but shorter than the sum of the two sides. These simple checks can help catch a mistyped measurement or a calculation error. If both sides are positive, the result should satisfy:

  • d > l and d > w.
  • d < l + w.

If the length and width are equal, the rectangle is a square and its diagonal is the side length multiplied by √2, approximately 1.414. For instance, a square with 10 cm sides has a diagonal of about 14.14 cm. This is a useful check, but the general rectangle formula works whether or not the sides match.

Units, Rounding, and Common Mistakes

Use the same unit for both side measurements. You can calculate with inches, feet, millimeters, centimeters, or meters, but do not combine unlike units directly. Convert one measurement first: for example, change 2 feet to 24 inches before combining it with a width measured in inches. The answer then uses that common length unit. To convert a result, use 1 inch = 2.54 cm or 1 foot = 0.3048 m.

Keep full precision through the calculation and round only the final answer to the precision your task requires. Rounding the squares or square root too early can introduce avoidable error. Also distinguish the diagonal from the perimeter: the diagonal crosses the interior once, whereas the perimeter is the total distance around all four edges.

A frequent mistake is to add the side lengths and call the sum the diagonal. That gives the length of two sides joined at a corner, not the direct straight-line distance between opposite corners. Another is to use the area or perimeter formula in place of the Pythagorean theorem. For an ordinary rectangle with positive side lengths, the diagonal is found from the squares of the sides, not their product or their sum.

Limits of the Formula

This formula assumes a flat rectangle with straight sides and four right angles. It gives the distance between opposite corners in the rectangle’s plane. It does not account for depth: if you need the corner-to-corner distance through a rectangular box in three dimensions, you must include the box’s height as well, using √(l² + w² + h²).

Measurements may also be uncertain. A result calculated from rounded or approximate side lengths is an estimate, not a more precise measurement than the inputs support. For a close physical fit, allow for measurement uncertainty and any needed clearance rather than relying on a displayed decimal alone.

Frequently Asked Questions

What is the formula for the diagonal of a rectangle?
Use d = √(l² + w²), where l and w are the perpendicular side lengths and d is the diagonal.

Is a rectangle’s diagonal the same as its length?
Not usually. The diagonal is the straight-line distance between opposite corners, while length measures one side. The diagonal is longer than either side when both dimensions are positive.

Can I calculate the diagonal if I know only the area?
Not in general. Many rectangles with different side lengths can have the same area but different diagonals. You need both side lengths, or enough additional information to determine them.

Are the two diagonals of a rectangle equal?
Yes. In every rectangle, the diagonals are equal in length and bisect each other, meeting at their shared midpoint.

How do I find a missing side if I know the diagonal?
Rearrange the theorem. If d is the diagonal and l is the known side, then the other side is w = √(d² − l²). The diagonal must be at least as long as the known side for a real, nonnegative result.

Related

Formula used
in length | Length | cm | 3 | 0
in width | Width | cm | 4 | 0
out diagonal | Diagonal | cm | sqrt(length^2 + width^2) | 2
out area | Area | cm^2 | length * width | 2
out perimeter | Perimeter | cm | 2 * (length + width) | 2

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.