Diagonal Calculator — d = √(a² + b²) for Rectangle, Box & Screens

Rectangle and square diagonals (both directions), 3-D space diagonal, screen size from aspect ratio, and polygon diagonal count — with working.

Quick answer: Get the diagonal of a rectangle, box or TV screen from the sides (or work backwards from the diagonal), plus the diagonal count of any polygon — every step shown with a² + b² = c².

How to use

  1. Rectangle mode: enter length and width for the diagonal — or tick 'reverse' and enter one side plus the diagonal to solve for the missing side.
  2. Box mode: enter length, width and height for all four face diagonals and the space diagonal.
  3. Screen mode: enter the diagonal in inches (or cm) and pick the aspect ratio to get exact width and height.
  4. Polygon mode: enter the number of sides (3–100) for the total diagonal count n(n − 3)/2.
  5. Every mode prints the substituted formula before the answer — verify it by hand or with a tape measure.

About this tool

The diagonal is the straight-line shortcut across a rectangle, and every version of it comes from one formula, Pythagoras: d = √(a² + b²). That one line answers the builder's question (is this corner square? a 3 m × 4 m layout must measure exactly 5 m across), the packer's question (will a 140 cm pole fit diagonally in this 120 × 50 × 40 cm box? — compare the space diagonal √(a² + b² + c²)), and the buyer's question (a 55-inch 16:9 TV is 47.9 × 27.0 inches of actual picture). This calculator runs all four modes: it computes the diagonal from the sides, the missing side from a known diagonal (√(d² − a²) — the classic check that a foundation corner is 90°), the face and space diagonals of a box, screen width and height from diagonal inches and aspect ratio, and the diagonal count for any polygon. Each result prints the formula with your numbers substituted, so the arithmetic can be checked against a tape measure or a homework sheet. Related: the Aspect Ratio Calculator for screen maths and the Scientific Calculator for checking roots by hand.

FAQ

What is the diagonal formula of a rectangle?
d = √(length² + width²), straight from Pythagoras — the diagonal and the two sides form a right triangle. A 6 × 8 rectangle has d = √(36 + 64) = 10. The same formula reversed, width = √(d² − length²), finds a missing side.
How do builders use diagonals to check a square corner?
Measure both diagonals of the layout: they are equal only when all corners are 90°. The quick tape-measure trick is the 3-4-5 rule — mark 3 m along one edge and 4 m along the other; the mark-to-mark distance must be exactly 5 m. This is just the calculator's formula with a=3, b=4.
What is a space diagonal?
The longest straight line that fits inside a box: d = √(l² + w² + h²). A 120 × 50 × 40 cm box has a space diagonal of √(14,400 + 2,500 + 1,600) = √18,500 ≈ 136 cm — so a 130 cm pole fits flat but a 140 cm one does not, no matter how you rotate it.
How do I get screen width and height from inches?
For a 16:9 screen, width = diagonal × 16/√(16² + 9²) and height = diagonal × 9/√(337). A '55-inch' TV is 47.94 × 26.96 inches (121.8 × 68.5 cm) of picture. That is why a 55-inch TV is much wider than a 55-inch shelf slot — check the width, not the diagonal.
How many diagonals does a polygon have?
n(n − 3)/2: from each of the n vertices you can draw n − 3 diagonals (every vertex except itself and its two neighbours), and each diagonal is counted twice. Square: 2. Pentagon: 5. Hexagon: 9. Decagon: 35.
Why is a square's diagonal side × √2?
A square is a rectangle with equal sides, so d = √(s² + s²) = s√2 ≈ 1.414s. A square tile with 30 cm sides measures 42.4 cm corner to corner — the same √2 that makes A4 paper fold so neatly.

Rate this tool

Your rating stays in this browser (local storage) — nothing is sent to any server.

Related tools

🎂

Age Calculator

Calculators

%

Percentage Calculator

Calculators

🏦

EMI / Loan Calculator

Calculators

⚖️

BMI Calculator

Calculators

🎓

CGPA / Percentage Converter

Calculators

📏

Land Area Converter

Calculators

📆

Date Difference Calculator

Calculators

🧁

Cooking Unit Converter

Calculators

🏷️

Unit Price Comparator

Calculators

🐕

Pet Cost Calculator

Calculators

⛽

Fuel Cost Calculator

Calculators

🎓

Grade Calculator

Calculators

📝

Final Exam Grade Calculator

Calculators

📅

Business Days Calculator

Calculators

🔢

Number to Words Converter

Calculators

🧮

Online Calculator

Calculators

📏

Length Converter

Calculators

⚖️

Weight Converter

Calculators

🌡️

Temperature Converter

Calculators

🏎️

Speed Converter

Calculators

🗺️

Area Converter

Calculators

🧪

Volume Converter

Calculators

🎈

Pressure Converter

Calculators

🍳

Cooking Measurement Converter

Calculators

👟

Shoe Size Converter

Calculators

🎲

Random Number Generator

Calculators

🎲

Online Dice Roller

Calculators

🪙

Coin Flip Online

Calculators

🤷

Yes or No Picker

Calculators

⏲️

Online Countdown Timer

Calculators

⏱️

Online Stopwatch

Calculators

🔢

Lucky Number Calculator

Calculators

♈

Zodiac Sign Finder (Star Sign)

Calculators

📈

Biorhythm Calculator

Calculators

🎨

Lucky Color Finder (By Birth Date)

Calculators

🐾

Pet Age Converter (Dog & Cat Years)

Calculators

🥣

Pet Food Calculator (Daily Portions)

Calculators

🎯

GPA Goal Calculator

Calculators

💱

Currency Converter

Calculators

🏛️

Roman Numeral Converter

Calculators

🍅

Pomodoro Timer

Calculators

📐

Aspect Ratio Calculator

Calculators

👥

Age Difference Calculator

Calculators

🌐

Bandwidth Calculator

Calculators

💰

1099 Tax Calculator

Calculators

💰

Annuity Calculator

Calculators

💰

ATS Resume Checker

Calculators

💰

Business Loan Calculator

Calculators

💰

Company Tax Calculator

Calculators

💰

Crypto Tax Calculator

Calculators

💰

CV Maker (Academic Style)

Calculators

💰

Debt Consolidation Loan Calculator

Calculators

💰

Employer Cost Calculator

Calculators

💰

Forex Lot Size Calculator

Calculators

💰

Forex Trade Simulator

Calculators

💰

Freelance Invoice Template

Calculators

💰

Life Insurance Needs Calculator

Calculators

💰

Australia Mortgage Calculator

Calculators

💰

Canada Mortgage Calculator

Calculators

💰

Florida Mortgage Calculator

Calculators

💰

Hawaii Mortgage Calculator

Calculators

💰

Maryland Mortgage Calculator

Calculators

💰

Texas Mortgage Calculator

Calculators

💰

UK Mortgage Calculator

Calculators

💰

Washington Mortgage Calculator

Calculators

💰

Online Will Maker

Calculators

💰

Overtime Calculator

Calculators

💰

Payroll Calculator

Calculators

💰

Georgia Employer Payroll Tax Calculator

Calculators

💰

New York Employer Payroll Tax Calculator

Calculators

💰

North Carolina Employer Payroll Tax Calculator

Calculators

💰

Texas Employer Payroll Tax Calculator

Calculators

💰

Quarterly Tax Calculator

Calculators

💰

Refinance Calculator

Calculators

💰

Resume Score Checker

Calculators

💰

Resume Template (Plain Text)

Calculators

💰

Retirement Investment Calculator

Calculators

💰

Retirement Savings Calculator

Calculators

💰

Reverse Mortgage Calculator

Calculators

💰

Salary Paycheck Calculator

Calculators

💰

Contractor Salary Calculator

Calculators

💰

Self-Employed Tax Calculator California

Calculators

💰

Self-Employed Tax Calculator UK

Calculators

💰

Solar Panel Cost Calculator

Calculators

💰

Stock Market Simulator

Calculators

💰

Federal Tax Calculator

Calculators

💰

Tax Deduction Calculator

Calculators

🧮

Scientific Calculator

Calculators

🎓

A-Level Grade Calculator

Calculators

📝

ACT Score Calculator

Calculators

🏫

SAT Score Calculator

Calculators

🍕

Fraction Calculator

Calculators

📐

Quadratic Equation Solver

Calculators

🐕

Dog Age Calculator

Calculators

⛳

Golf Handicap Calculator

Calculators

🏷️

Stacked Discount Calculator

Calculators

🔢

Mixed Number Calculator

Calculators

✖️

FOIL Calculator

Calculators

🔺

Discriminant Calculator

Calculators

🧮

Gaussian Elimination Calculator

Calculators

〰️

Fourier Series Calculator

Calculators

📈

Gradient Calculator

Calculators

Related Tools & Guides

Audio Trimmer Audio Volume Booster Audio Waveform Generator Audiobook Sample Downloader Australia Take Home Calculator Auto Loan Calculator