Diagonal Calculator
A diagonal calculator helps you find the distance between two opposite corners of a geometric shape. Enter the required dimensions, and calculate the diagonal of a rectangle or square without doing the math manually.
For a rectangle, the calculator uses its length and width. You can also calculate the diagonal using other known measurements, such as area and perimeter. Results can be converted into millimeters, centimeters, meters, feet, and inches. The diagonal is useful in construction, flooring, furniture making, screen measurements, engineering, and everyday geometry problems.
You can also use this 8th Pay Commission Salary Calculator 2026.
How to Use the Diagonal Calculator
To calculate the diagonal of a rectangle:
- Enter the longer side (length).
- Enter the shorter side (width).
- Select the measurement unit, such as mm, cm, meters, or feet.
- Calculate the diagonal.
- Review the result and convert it into another unit if needed.
Depending on the calculator’s available inputs, you may also be able to enter the area, perimeter, angle between diagonals, or circumcircle radius. For a square, enter one side length. The calculator uses the square diagonal formula to find the distance between opposite corners.
What Is a Diagonal?
A diagonal is a straight line connecting two non-adjacent vertices of a polygon. In a rectangle, it connects one corner to the opposite corner and divides the shape into two identical right-angled triangles. A rectangle has two diagonals. Both have the same length and intersect at their midpoints. A square also has two equal diagonals. However, its diagonals intersect at a 90-degree angle, while the diagonals of an ordinary rectangle do not necessarily meet at a right angle.
The diagonal is different from the perimeter and area:
- Diagonal: Distance between opposite corners.
- Perimeter: Total distance around the shape.
- Area: Amount of surface covered by the shape.
Diagonal Calculator Formula
The most common diagonal formula comes from the Pythagorean theorem.
For a rectangle:
d = √(l² + w²)
Where:
- d = Diagonal
- l = Length
- w = Width
- √ = Square root
The diagonal acts as the hypotenuse of a right triangle, while the length and width are its two perpendicular sides.
Example: Rectangle Diagonal
Suppose a rectangle has:
- Length = 12 cm
- Width = 5 cm
Apply the formula:
d = √(12² + 5²)
d = √(144 + 25)
d = √169
d = 13 cm
Therefore, the rectangle’s diagonal is 13 cm.
Diagonal Calculator for a Square
A square is a special type of rectangle in which all four sides have equal lengths. Its diagonal can be calculated using a simplified formula.
d = s × √2
Where:
- d = Diagonal
- s = Side length
- √2 ≈ 1.4142
Example: Square Diagonal
Suppose each side of a square measures 10 cm.
d = 10 × √2
d = 10 × 1.4142
d ≈ 14.14 cm
The diagonal is approximately 14.14 cm.
You can also use the formula to calculate the side length if you know the diagonal:
s = d / √2
For example, if a square has a diagonal of 20 cm:
s = 20 / 1.4142
s ≈ 14.14 cm
Other Diagonal Calculator Formulas
Sometimes, you may not know both the length and width of a rectangle. You can still calculate its diagonal if you have other measurements.
The following formulas cover several common situations.
1. Given Length and Width
Use the standard Pythagorean formula:
d = √(l² + w²)
Example:
Length = 8 m
Width = 6 m
d = √(8² + 6²)
d = √(64 + 36)
d = 10 m
2. Given Area and One Side
The area of a rectangle is:
A = l × w
If you know the area and length:
w = A / l
Then calculate:
d = √(l² + (A/l)²)
Similarly, if you know the width:
d = √(w² + (A/w)²)
Example:
Area = 48 m²
Length = 8 m
Width = 48 / 8 = 6 m
d = √(8² + 6²)
d = 10 m
3. Given Perimeter and One Side
The perimeter formula is:
P = 2(l + w)
If the length and perimeter are known:
w = P/2 − l
The diagonal becomes:
d = √(l² + (P/2 − l)²)
Example:
Perimeter = 28 cm
Length = 10 cm
Width = 28/2 − 10 = 4 cm
d = √(10² + 4²)
d = √116
d ≈ 10.77 cm
4. Given Area and Perimeter
If you know the area and perimeter, you can calculate the diagonal directly:
d = ½ × √(P² − 8A)
Where:
- P = Perimeter
- A = Area
Example:
Area = 18 cm²
Perimeter = 20 cm
d = ½ × √(20² − 8 × 18)
d = ½ × √(400 − 144)
d = ½ × √256
d = 8 cm
This formula works for a valid rectangle when the given area and perimeter are consistent.
5. Given Circumcircle Radius
Every rectangle can fit inside a circle that passes through all four corners. This circle is called its circumcircle.
The diagonal of the rectangle is the diameter of that circle.
d = 2r
Where r is the circumcircle radius.
Example:
Radius = 7 cm
d = 2 × 7
d = 14 cm
6. Given Area and Angle Between Diagonals
If you know the rectangle’s area and the angle between its diagonals, you can use:
d = √(2A / sin α)
Where:
- A = Area
- α = Angle between the diagonals
Example:
Area = 50 cm²
Angle = 90°
d = √(2 × 50 / sin 90°)
d = √100
d = 10 cm
The angle must be entered in the appropriate unit expected by the calculator.
Diagonal Calculator in Different Units
You can calculate a diagonal using almost any length unit. The important rule is to use the same unit for all dimensions before applying the formula.
Diagonal Calculator in mm
For measurements in millimeters:
d = √(l² + w²)
Example:
Length = 600 mm
Width = 800 mm
d = √(600² + 800²)
d = √1,000,000
d = 1,000 mm
This is useful for metal fabrication, engineering drawings, machine components, and small construction measurements.
Diagonal Calculator in Meters
For measurements in meters:
d = √(l² + w²)
Example:
Length = 5 m
Width = 12 m
d = √(25 + 144)
d = 13 m
This calculation is useful for room dimensions, building layouts, land measurements, and flooring projects.
Diagonal Calculator in Feet
If both dimensions are measured in feet, the result will also be in feet.
Example:
Length = 15 ft
Width = 8 ft
d = √(15² + 8²)
d = √289
d = 17 ft
Diagonal Calculator in Feet and Inches
When measurements use feet and inches, convert everything into one unit first.
For example:
Length = 10 ft 6 in
Width = 6 ft
Convert to inches:
Length = 126 in
Width = 72 in
d = √(126² + 72²)
d = √(15,876 + 5,184)
d = √21,060
d ≈ 145.12 inches
Convert the result back into feet and inches:
145.12 inches = 12 ft 1.12 in
The diagonal is approximately 12 ft 1.12 in.
Diagonal Calculator for a Triangle
A triangle does not have a diagonal in the same way that a rectangle or square does. A diagonal connects two non-adjacent vertices, but every pair of vertices in a triangle is already connected by a side. However, you may be trying to find the longest side of a right triangle, called the hypotenuse.
Use the Pythagorean theorem:
c = √(a² + b²)
Where:
- c = Hypotenuse
- a = First perpendicular side
- b = Second perpendicular side
Example:
a = 9 cm
b = 12 cm
c = √(9² + 12²)
c = √225
c = 15 cm
For a non-right triangle, you can calculate an unknown side using the law of cosines if you know the other two sides and their included angle.
Diagonal of a Rectangle vs Square
Both shapes have two equal diagonals, but their formulas and properties differ slightly.
| Property | Rectangle | Square |
|---|---|---|
| Side lengths | Opposite sides equal | All sides equal |
| Diagonal formula | √(l² + w²) | s√2 |
| Diagonals equal | Yes | Yes |
| Diagonals bisect each other | Yes | Yes |
| Diagonals meet at 90° | Not generally | Yes |
| Diagonals bisect corner angles | Not generally | Yes |
A square is a special rectangle, so the general rectangle formula also works for squares. When length and width are equal, it simplifies to the square diagonal formula.
Applications of Diagonal Calculations
Diagonal measurements are useful in many practical situations.
Construction and flooring: Builders use diagonal measurements to check whether a rectangular room or floor layout is square. Equal diagonals are a useful check for a rectangular layout.
Furniture making: Diagonal measurements help verify the dimensions and alignment of tabletops, cabinets, doors, and frames.
Television and monitor screens: Screen sizes are generally measured diagonally. A diagonal measurement can be calculated from the screen’s width and height.
Land and room planning: Diagonals help measure corner-to-corner distances across rectangular spaces.
Engineering and manufacturing: Diagonal calculations are used to check rectangular components, metal sheets, panels, and machine parts.
Carpentry: Measuring both diagonals of a rectangular frame helps identify whether the frame is properly aligned.
Common Mistakes When Calculating a Diagonal
Avoid these errors when using a diagonal formula:
- Adding the sides instead of squaring them: The formula requires the square of each side before addition.
- Forgetting the square root: After adding the squared values, take the square root to obtain the diagonal.
- Mixing units: Do not enter one side in feet and another in inches without converting them first.
- Confusing area with diagonal: Area is measured in square units, while a diagonal is measured in linear units.
- Using the wrong triangle formula: The Pythagorean theorem applies directly to right triangles.
- Rounding too early: Keep extra decimal places during calculations and round only the final result.
Frequently Asked Questions
What is the formula for the diagonal of a rectangle?
The formula is d = √(l² + w²), where l is the length and w is the width. It comes from the Pythagorean theorem because the diagonal forms the hypotenuse of a right triangle.
How do I calculate the diagonal of a square?
Multiply the side length by the square root of 2.
d = s√2
For example, a square with a side of 5 cm has a diagonal of approximately 7.07 cm.
How do I find a rectangle’s diagonal using its area and perimeter?
Use the formula:
d = ½√(P² − 8A)
Here, P represents the perimeter and A represents the area. The given measurements must describe a valid rectangle.
Can I calculate a diagonal in millimeters?
Yes. Enter both dimensions in millimeters and apply the standard formula. The result will also be in millimeters.
Can I calculate a diagonal in feet and inches?
Yes. Convert both measurements into inches or feet before calculating. Once you get the result, convert it back into feet and inches if needed.
Does a rectangle have two diagonals?
Yes. A rectangle has two diagonals connecting opposite corners. They are equal in length and bisect each other at their intersection.
Are the diagonals of a rectangle equal?
Yes. Both diagonals of a rectangle have the same length, regardless of whether it is a square or an ordinary rectangle.
Do rectangle diagonals meet at a 90-degree angle?
Not generally. They meet at 90 degrees only when the rectangle is a square.
Does a triangle have a diagonal?
No. A triangle has no diagonals because every pair of its vertices is already connected by one of its three sides. For a right triangle, you can calculate the hypotenuse using the Pythagorean theorem.
How do I calculate a rectangle’s diagonal without a calculator?
Square the length and width, add the results, and find the square root of the sum.
For example, if the sides are 3 and 4:
d = √(3² + 4²)
d = √25 = 5
Can Google calculate a rectangle’s diagonal?
Yes. You can enter a mathematical expression such as sqrt(12^2+5^2) into Google Search to calculate the result. You can also use a dedicated online diagonal calculator when you need multiple measurements or unit conversions.
Is there a diagonal calculator app?
You can use a scientific calculator app on your phone to enter the formula. A dedicated geometry or measurement calculator may also offer direct inputs for length, width, area, and perimeter.
Conclusion
A diagonal calculator makes it easy to find the corner-to-corner distance of a rectangle or square. The standard formula, d = √(l² + w²), works for rectangular shapes, while the simplified square formula is d = s√2. Whether your measurements are in millimeters, meters, feet, or inches, keep the units consistent and apply the correct formula. You can also calculate a diagonal from area, perimeter, or circumcircle radius when both side lengths are not available.