Enter the vertical distance and the horizontal distance into the Diagonal Distance Calculator. The calculator will evaluate and display the Diagonal Distance.
- All Math and Numbers Calculators
- Vertical Distance Calculator
- Distance Between Points Calculator
- Reverse Hypotenuse Calculator
- Height Distance Calculator
- Distance Angle Calculator
Diagonal Distance Formula
The calculator uses one of four formulas depending on the mode you pick.
Width + height (2D rectangle):
d = √(horizontal² + vertical²)
Coordinates (two points in a plane):
d = √((x₂ − x₁)² + (y₂ − y₁)²)
Missing side (one leg unknown):
a = √(d² − b²)
3D box (space diagonal):
d = √(length² + width² + height²)
- d — diagonal distance
- horizontal, vertical — the two sides of the rectangle
- (x₁, y₁), (x₂, y₂) — coordinates of the two points
- a — missing side length
- b — known side length
- length, width, height — the three edges of the box
All formulas assume right angles between sides. Inputs in different units are converted to meters internally, then the result is returned in your chosen unit. Negative values are not accepted for side lengths, but coordinates can be negative.
Reference Values
Quick reference for common diagonal calculations.
| Rectangle (W × H) | Diagonal |
|---|---|
| 3 × 4 | 5 |
| 5 × 12 | 13 |
| 8 × 15 | 17 |
| 10 × 10 | 14.142 |
| 16 × 9 (TV) | 18.358 |
| 20 × 30 (room ft) | 36.056 |
| 3D Box (L × W × H) | Space Diagonal |
|---|---|
| 1 × 1 × 1 | 1.732 |
| 2 × 3 × 6 | 7.000 |
| 4 × 4 × 4 | 6.928 |
| 10 × 6 × 4 | 12.329 |
| 24 × 18 × 12 (box in) | 32.311 |
Worked Example
You are checking whether a 55-inch TV (measured diagonally) fits a wall opening that is 48 inches wide and 28 inches tall.
Use the width + height mode:
- d = √(48² + 28²)
- d = √(2304 + 784)
- d = √3088 ≈ 55.57 inches
The opening's diagonal is 55.57 inches, so a 55-inch TV will fit, but only barely.
FAQ
Does this work for any rectangle or only squares? Any rectangle. The two sides do not need to be equal.
Can I mix units? Yes. Each input has its own unit selector. The calculator converts everything before computing.
What if I only know the diagonal and one side? Use the "Missing side" mode. It returns the other leg using a = √(d² − b²).
Why does the 3D mode also show a face diagonal? The face diagonal is useful when you need to slide a flat object through the longest side of a box, not the full corner-to-corner space diagonal.
