Diagonal Calculator
Rectangle Diagonal
—
Square Diagonal
—
How Diagonal Calculations Work
A diagonal is a straight line segment connecting two non-adjacent vertices of a polygon. For rectangles and squares, the diagonal is the longest internal distance, and it is calculated using the Pythagorean theorem. According to the National Council of Teachers of Mathematics (NCTM), understanding diagonal relationships is a foundational geometry skill used across construction, engineering, and design.
Anyone measuring room layouts, checking whether a frame is square, sizing a TV for a wall mount, or calculating the internal bracing of a structure needs to compute diagonals. Carpenters use diagonals daily to verify that walls, decks, and foundations are perfectly rectangular. Interior designers use them to determine whether furniture will fit through doorways or around corners. Even athletes encounter diagonals when calculating the distance of a throw across a rectangular field.
The Diagonal Formulas
The rectangle diagonal formula derives directly from the Pythagorean theorem, which states that in a right triangle, the square of the hypotenuse equals the sum of the squares of the other two sides. Since a diagonal splits a rectangle into two congruent right triangles, the formula is:
Rectangle diagonal: d = √(L² + W²)
Where L is the length and W is the width. For a square with side s, both sides are equal, so this simplifies to:
Square diagonal: d = s × √2 ≈ s × 1.4142
Worked example: A room measures 12 feet by 16 feet. The diagonal is √(12² + 16²) = √(144 + 256) = √400 = 20 feet. This means a piece of trim or cable running corner-to-corner needs to be at least 20 feet long. These formulas are standard Euclidean geometry results documented in textbooks going back to Euclid's Elements (circa 300 BCE).
Key Terms You Should Know
- Diagonal: A line segment connecting two non-adjacent vertices of a polygon. A rectangle has 2 diagonals; a pentagon has 5; a decagon has 35.
- Pythagorean theorem: The relationship a² + b² = c² for right triangles, forming the basis of all rectangle diagonal calculations.
- Bisect: To divide into two equal parts. A rectangle's diagonals bisect each other (cross at the midpoint), while a square's diagonals bisect each other at 90-degree angles.
- Aspect ratio: The ratio of width to height (e.g., 16:9 for modern TVs). Combined with the diagonal, it determines the actual screen width and height.
- Space diagonal: The diagonal of a 3D rectangular box, calculated as d = √(L² + W² + H²). A shipping box measuring 24 × 18 × 12 inches has a space diagonal of about 32.3 inches.
Common Diagonal Measurements
The table below shows diagonal values for common rectangular dimensions encountered in everyday life, from standard paper sizes to room layouts and screen dimensions. All values are calculated using d = √(L² + W²) and rounded to two decimal places.
| Object | Dimensions | Diagonal |
|---|---|---|
| Letter paper (US) | 8.5 × 11 in | 13.90 in |
| A4 paper | 210 × 297 mm | 363.7 mm |
| Standard door | 36 × 80 in | 87.74 in |
| King-size bed | 76 × 80 in | 110.28 in |
| 10 × 12 ft room | 120 × 144 in | 15.62 ft |
| 55-inch TV (16:9) | 47.9 × 27.0 in | 55.00 in |
Practical Examples
Example 1 — Checking a wall for square: A builder constructs a wall frame 8 feet wide and 10 feet tall. The diagonal should measure √(8² + 10²) = √(64 + 100) = √164 = 12.81 feet. If the measured diagonal matches, the frame is perfectly rectangular. This is the same principle behind the classic 3-4-5 rule used on every construction site.
Example 2 — Will the couch fit? You need to move a 7-foot sofa diagonally through a doorway that is 36 inches wide and 80 inches tall. The doorway diagonal is √(36² + 80²) = √(1296 + 6400) = √7696 = 87.7 inches = 7.31 feet. The sofa will fit diagonally with about 3.7 inches to spare.
Example 3 — TV screen dimensions: You know a TV is 65 inches (diagonal) with a 16:9 aspect ratio. Using the relationship d = √(W² + H²) and W/H = 16/9, you can derive: W = 56.65 inches and H = 31.87 inches. Use our rectangle area calculator to find the screen area is about 1,805 square inches.
Tips for Working with Diagonals
- Always use the same units: Convert all measurements to the same unit before calculating. Mixing feet and inches produces incorrect results.
- Use the 3-4-5 shortcut: Any multiple of 3-4-5 (e.g., 6-8-10, 9-12-15, 12-16-20) gives an exact right angle. This avoids square roots entirely for on-site checks.
- Account for real-world clearance: When moving furniture through doorways, subtract at least 1-2 inches from the theoretical diagonal for handles, molding, and maneuvering room.
- For polygon diagonals: Use the formula n(n - 3) / 2 to find how many diagonals any polygon has. A hexagon has 6(6 - 3)/2 = 9 diagonals.
- 3D space diagonals: Extend the formula to three dimensions with d = √(L² + W² + H²) for boxes, containers, and rooms. This tells you the longest item that will fit inside.
Diagonals in Geometry and Construction Standards
The diagonal is one of the oldest measured geometric properties. Ancient Babylonian clay tablets from around 1800 BCE show calculations of the diagonal of a square, approximating √2 as 1.41421 — accurate to 5 decimal places. The National Institute of Standards and Technology (NIST) defines the value of √2 as 1.41421356... (irrational). In modern construction, the International Residential Code (IRC) requires that floor diagonals be within 1/8 inch of each other to confirm a foundation is square. For screen manufacturing, the Consumer Technology Association (CTA) mandates that advertised screen sizes refer to the viewable diagonal, not the overall frame diagonal.
Frequently Asked Questions
How do you calculate the diagonal of a rectangle?
The diagonal of a rectangle is calculated using the Pythagorean theorem: d = √(length² + width²). For example, a rectangle measuring 6 by 8 units has a diagonal of √(36 + 64) = √100 = 10 units. Both diagonals of a rectangle are equal in length and bisect each other, though they do not cross at right angles unless the rectangle is also a square. This formula works for any units — inches, feet, meters, or centimeters — as long as both measurements use the same unit.
What is the diagonal of a square?
The diagonal of a square equals the side length multiplied by √2, which is approximately 1.4142. A square with a side of 10 units has a diagonal of about 14.14 units. Both diagonals of a square are equal and bisect each other at right angles, creating four congruent right isosceles triangles. This relationship is derived directly from the Pythagorean theorem with equal sides, so d = √(s² + s²) = s√2.
How is screen size measured using the diagonal?
Screen size for TVs, monitors, and phones is always measured along the diagonal from one corner to the opposite corner. A 55-inch TV has a 55-inch diagonal measurement. The actual width and height depend on the aspect ratio — a 55-inch TV with a 16:9 ratio is roughly 47.9 inches wide and 27.0 inches tall. You can use the diagonal formula in reverse to find these dimensions. The Consumer Technology Association requires all advertised screen sizes to reference the viewable diagonal.
How many diagonals does a polygon have?
A polygon with n sides has n(n - 3) / 2 diagonals. A triangle has 0 diagonals, a quadrilateral has 2, a pentagon has 5, a hexagon has 9, and a decagon has 35. This formula comes from the fact that each vertex connects to n - 3 other vertices via diagonals (excluding itself and its two adjacent vertices), divided by 2 to avoid double-counting. For regular polygons, all diagonals can be computed from the side length and the number of sides.
What is the 3-4-5 rule in construction?
The 3-4-5 rule is a practical application of the diagonal formula used to verify right angles on construction sites. Builders measure 3 feet along one wall, 4 feet along the adjacent wall, and check whether the diagonal between those two points is exactly 5 feet. If it is, the corner is a perfect 90-degree angle. Any multiple works — 6-8-10, 9-12-15, or 12-16-20. This technique dates back to ancient Egypt and remains the fastest way to check for square without specialized equipment.
Can you calculate the diagonal of a cube or 3D box?
Yes. The space diagonal of a rectangular box (cuboid) with dimensions l, w, and h is d = √(l² + w² + h²). For a cube with side s, the space diagonal simplifies to s√3, which is approximately s × 1.732. A cube with 10-inch sides has a space diagonal of about 17.32 inches. This is useful for determining whether items will fit inside containers diagonally, or for calculating the longest rod that can fit inside a room.