Geometry Calculator Online

Diagonal Calculator Online — Rectangle, Square, Parallelogram, Rhombus, Cuboid, Polygon & Screen

Free diagonal calculator to find diagonal length instantly using the correct formula for each shape. Supports rectangle, square, parallelogram, rhombus, cuboid, polygon, TV screen, and room diagonals. Perfect for students, engineers, construction workers, and woodworkers. Uses the Pythagorean theorem and law of cosines for accurate results.

Primary Result - Enter values to calculate.

Diagonal of Rectangle Calculator

Find diagonal of rectangle given two sides.

Diagonal Length-
Perimeter-
Area-
Formulad = sqrt(l² + w²)

Diagonal of Square Calculator

Square diagonal length formula with instant output.

Diagonal-
Perimeter-
Area-
Formulad = s × sqrt(2)

Diagonal of Parallelogram Calculator

Find diagonals of parallelogram given two sides and included angle using the law of cosines.

Diagonal p (shorter)-
Diagonal q (longer)-
Area-
Perimeter-
Formulap² + q² = 2(a² + b²)

Diagonal of Rhombus Calculator

Calculate both diagonals of a rhombus from side length and one known diagonal or angle.

Diagonal p-
Diagonal q-
Area-
Perimeter-
Key PropertyDiagonals are perpendicular

Diagonal of Cuboid Calculator

3d diagonal of box calculator online.

Space Diagonal-
Face Diagonal (L-W)-
Face Diagonal (L-H)-
Face Diagonal (W-H)-

Number of Diagonals in Polygon Calculator

Formula for pentagon, hexagon, and n-sided polygons.

Total Diagonals-
From One Vertex-
Formulan × (n - 3) ÷ 2

Screen Diagonal Calculator Online

TV diagonal calculator online with resolution and optional PPI.

Diagonal (px)-
Aspect Ratio-
Diagonal (in)-
Diagonal (cm)-

Room Diagonal Calculator Online

Diagonal distance of room corner to corner and squareness check.

Expected Diagonal-
Difference-
StatusAdd measured value
Live representative diagram updates based on selected mode and inputs.

Diagonal Formula Guide — Complete Reference for All Shapes

This comprehensive diagonal calculator uses the Pythagorean theorem, law of cosines, and geometric formulas to cover every diagonal measurement use case — from homework and exams to woodworking, construction squaring, and TV screen sizing.

How to Find Diagonal of Rectangle Online

Use this rectangle diagonal length calculator when you know length and width.

d = sqrt(length² + width²)

Diagonal of Cube and Cuboid

For a cuboid, the space diagonal comes from all three dimensions.

d = sqrt(l² + w² + h²)

Polygon Diagonals Formula

Quickly answer exam-style questions such as how many diagonals does a hexagon have.

n × (n - 3) ÷ 2

Screen and TV Diagonal Measurement

Use resolution and PPI to estimate diagonal in inches, useful for monitor and TV size checks.

Diagonal of Parallelogram Formula

Uses the law of cosines to find both diagonals when sides and angle are known. Both diagonals satisfy p² + q² = 2(a² + b²).

d = √(a² + b² − 2ab·cosθ)

Diagonal of Rhombus Formula

Diagonals of a rhombus are always perpendicular and bisect each other. Given side a and angle θ: p = 2a·sin(θ/2) and q = 2a·cos(θ/2).

p = 2a·sin(θ/2), q = 2a·cos(θ/2)

Diagonal for Construction & Woodworking

Use the 3-4-5 rule or diagonal measurement to verify if a frame, foundation, or room corner is perfectly square. Compare expected vs measured diagonal.

Face Diagonal vs Space Diagonal

A face diagonal runs across one surface of a 3D shape. A space diagonal passes through the interior from one corner to the opposite corner, and is always longer.

Face: √(l² + w²) | Space: √(l² + w² + h²)

Step-by-Step Worked Examples

Example 1: Rectangle Diagonal

Problem: Find the diagonal of a rectangle with length 16 cm and width 12 cm.

Step 1: Square each side: 16² = 256, 12² = 144

Step 2: Add the squares: 256 + 144 = 400

Step 3: Take the square root: √400 = 20 cm

Example 2: Square Diagonal from Area

Problem: A square has area 50 cm². Find its diagonal.

Step 1: Find side: s = √50 ≈ 7.07 cm

Step 2: Apply formula: d = s × √2 = 7.07 × 1.414 = 10 cm

Example 3: Parallelogram Diagonals

Problem: Parallelogram with sides 8 cm, 6 cm and angle 60°.

Step 1: p = √(64 + 36 − 2×8×6×cos60°) = √(100 − 48) = √52 ≈ 7.21 cm

Step 2: q = √(64 + 36 + 2×8×6×cos60°) = √(100 + 48) = √148 ≈ 12.17 cm

Example 4: Space Diagonal of a Box

Problem: Find the space diagonal of a box 12 × 9 × 8 cm.

Step 1: Sum of squares: 144 + 81 + 64 = 289

Step 2: Square root: √289 = 17 cm

The Hidden Magic of Diagonals: More Than Just a Math Formula

If you’ve ever tried to wrestle a bulky new sofa through a narrow hallway, hung a gallery wall of picture frames, or found yourself arguing with a friend about who actually has the bigger TV, you’ve dealt with diagonals. We often think of geometry as a dry subject we left behind in high school, a collection of abstract rules that don't apply to the real world. But the truth is, diagonals are the unsung, invisible heroes of our everyday physical environment. They are the underlying secret to keeping our houses standing straight, ensuring our screens are measured fairly, and helping us figure out if that new piece of furniture will actually fit.

What Exactly is a Diagonal, Anyway?

In the simplest possible terms, a diagonal is just a straight line connecting two opposite corners of a shape. If you have a standard rectangle—like a piece of printer paper, a window, or the floor of your living room—the diagonal cuts right across the middle from corner to corner. But why does this specific line matter so much? Because that single measurement tells us an incredible amount about the structural integrity and properties of the shape itself.

Thanks to an ancient Greek mathematician named Pythagoras, we know that if you have the length and the width of a perfect rectangle, the diagonal is completely predictable. It acts as the hypotenuse of a right-angled triangle. More practically, it represents the absolute longest straight path you can take inside that rectangular boundary. Knowing this distance is crucial for everything from packing shipping boxes to architectural design.

The Builder's Secret Weapon: Squaring a Room

Ask any experienced carpenter, contractor, or dedicated DIY enthusiast how they know a wooden deck or a room foundation is perfectly "square," and they won't pull out a giant protractor to measure the 90-degree angles. Instead, they reach straight for their trusty tape measure and check the diagonals.

Here’s how this brilliant, centuries-old trick works: if you measure the distance from the top-left corner to the bottom-right, and then measure from the top-right to the bottom-left, those two numbers should be exactly the same down to the millimeter. If one diagonal is even slightly longer than the other, your rectangle isn't a rectangle at all—it’s actually a parallelogram, meaning your structure is leaning or skewed. This simple cross-measurement technique, often utilized alongside the famous 3-4-5 rule (where sides measuring 3 and 4 units will always yield a diagonal of exactly 5 units), has been used for generations to build sturdy, perfectly aligned structures long before the invention of fancy laser levels.

Why Are TVs, Monitors, and Phones Measured Diagonally?

Have you ever stopped to wonder why you buy a "65-inch TV" instead of a "57-inch wide TV"? It seems incredibly counterintuitive to measure a rectangular screen from corner to corner, rather than just simply stating its physical width and height. How did this confusing standard become the global norm?

This industry quirk is actually a fascinating leftover from the early days of television manufacturing. The very first TV screens weren't flat panels; they were round, bulky glass cathode-ray tubes (CRTs). To accurately describe the size of a round tube, you give its diameter. When manufacturers realized that circular pictures cut off too much of the broadcasting signal, they started hiding the round edges of the glass tube behind rectangular plastic frames. However, they kept using the glass tube's original diameter for marketing purposes—which happens to be the exact same distance as the diagonal of the visible rectangular screen. The tradition stuck permanently. Today, measuring diagonally gives us a single, convenient number to quickly compare screen sizes, even as aspect ratios have drastically changed from the old, boxy 4:3 tube TVs to modern, cinematic 16:9 widescreen formats.

Thinking Outside the Flat Box: The Magic of Space Diagonals

While flat 2D surfaces are relatively easy to understand, diagonal measurements get really interesting when we step off the paper and into the third dimension. Imagine a standard cardboard shipping box. You have regular "face diagonals" running across the flat outer surfaces (like the top flaps or the side walls), but you also have a hidden measurement that mathematicians refer to as a "space diagonal."

A space diagonal runs straight through the empty air inside the middle of the box, starting from the bottom-front-left corner and ending all the way at the top-back-right corner. This invisible line is the absolute longest straight item you could possibly fit entirely inside that closed box. So, if you're trying to figure out how to safely pack a long poster tube, a camera tripod, or a golf club into a rectangular package, you aren't just looking at the length of the cardboard—you need to calculate that 3D space diagonal to see if your item will slide in corner-to-corner.

Measure Twice, Calculate Once

Whether you're laying down expensive floor tile, framing out a raised garden bed in your backyard, or just trying to figure out if that massive new curved monitor will actually fit properly on your home office desk, a solid understanding of diagonals saves you immense amounts of time, money, and frustration. The good news is that you absolutely don't need to memorize the complex formulas or dust off your old high school algebra textbook. That's exactly what our online calculator is designed for. By letting our tool handle the heavy mathematical lifting, you can focus your energy on getting the actual job done right, with the quiet confidence of knowing that the geometry is entirely on your side.

Frequently Asked Questions About Diagonal Calculations

What is the diagonal of a rectangle?

The diagonal of a rectangle is the straight line connecting two opposite corners. Every rectangle has exactly two diagonals of equal length. It is calculated using the Pythagorean theorem: d = √(length² + width²). The diagonal is always longer than either side because it forms the hypotenuse of a right triangle.

What is the diagonal of a square formula?

The diagonal of a square equals the side length multiplied by √2 (approximately 1.414). Formula: d = s × √2. This is a simplified form of the Pythagorean theorem since both sides are equal. If you know the area, the diagonal equals √(2 × area).

How to find the diagonal of a parallelogram?

Use the law of cosines: shorter diagonal p = √(a² + b² − 2ab·cosθ) and longer diagonal q = √(a² + b² + 2ab·cosθ), where a and b are adjacent sides and θ is the included angle. Both diagonals always satisfy the parallelogram law: p² + q² = 2(a² + b²).

Are diagonals of a rhombus always perpendicular?

Yes, the diagonals of a rhombus always intersect at right angles (90°) and bisect each other. If you know one diagonal p and the side length a, you can find the other diagonal using: q = 2 × √(a² − (p/2)²). The area of a rhombus equals (p × q) / 2.

How many diagonals does a hexagon have?

A hexagon has 9 diagonals. The formula is n × (n − 3) ÷ 2, where n is the number of sides. For a hexagon: 6 × (6 − 3) ÷ 2 = 9. A pentagon has 5, an octagon has 20, and a decagon has 35 diagonals.

What is the difference between face diagonal and space diagonal?

A face diagonal runs across one surface of a 3D shape (using two dimensions). A space diagonal passes through the interior from one corner to the diagonally opposite corner (using all three dimensions). For a cuboid: face diagonal = √(l² + w²), space diagonal = √(l² + w² + h²). The space diagonal is always longer.

How to measure TV screen diagonal correctly?

Measure only the visible display area from one corner to the diagonally opposite corner, excluding the bezel or frame. TV sizes like 55" refer to this diagonal measurement. For a 16:9 TV, you can calculate width = diagonal × 0.872 and height = diagonal × 0.49.

Why are TV screens measured diagonally?

The convention dates back to circular cathode ray tubes (CRTs), where the screen size was the tube diameter — which is the diagonal of the rectangular visible area. The industry kept this standard because a single diagonal number captures overall screen size regardless of aspect ratio.

How to square a room or foundation using diagonal measurement?

Calculate the expected diagonal from length and width: d = √(l² + w²). Then physically measure the actual corner-to-corner diagonal distance. If the measured value matches the expected value within 0.5% (or 3–4mm per metre), your corners are square. This is the builder's version of the 3-4-5 rule.

How to calculate screen width and height from diagonal and aspect ratio?

For a screen with diagonal D and aspect ratio W:H — screen width = D × W ÷ √(W² + H²) and screen height = D × H ÷ √(W² + H²). Example: A 55-inch 16:9 TV has width ≈ 47.9 in and height ≈ 27 in. This calculator automates this for common aspect ratios.