Diagonal of a Square Calculator

Calculate the diagonal of any square from its side length, area, or perimeter — and solve in reverse. Get the diagonal, side, area, perimeter, circumradius, inradius, and a complete step-by-step derivation instantly.

Diagonal of a Square Calculator

Side · Diagonal · Area · Perimeter — Instant Geometry Engine

Active Formula
Diagonal:d = s 2 ≈ 1.41421 × s
cm
Press Enter or click Calculate
Diagonal
d = s√2 ≈ 1.41421 × s
Side
s = d / √2 ≈ 0.70711 × d
Area
A = s² d = √(2A)
Perimeter
P = 4s d = P√2 / 4
Live Diagram
90°s = cmd = 45°

What Is the Diagonal of a Square?

The diagonal of a square is the straight line segment that connects two opposite (non-adjacent) corners of the square, passing through its interior. Every square has exactly two diagonals, and they are equal in length, bisect each other at right angles, and intersect at the center of the square.

Unlike a rectangle — where the two diagonals are equal but do not meet at right angles — a square's diagonals are perpendicular bisectors of each other, dividing the square into four congruent right isosceles triangles. Each triangle has legs equal to half the diagonal and a hypotenuse equal to the side length s.

The diagonal is fundamentally important in geometry because it transforms a 2D square into a system of right triangles, making the Pythagorean theorem directly applicable. This relationship — that the diagonal equals the side length multiplied by √2 — is one of the most elegant results in elementary geometry, and it appears constantly in engineering, architecture, design, and everyday measurement tasks.

The Diagonal Formula: d = s√2

Square Diagonal Calculator showing the formula d = s√2 with a teal neon square diagram, diagonal lines in amber, and labeled measurements on dark premium background

The diagonal of a square with side length s is:

  • d = s × √2 ≈ 1.41421356 × s

This formula comes directly from the Pythagorean theorem. If you label the two legs of the right triangle formed by the diagonal as both equal to s, then:

  • d² = s² + s² = 2s²
  • d = √(2s²) = s√2

The constant √2 ≈ 1.41421356237… is irrational — it cannot be expressed as a fraction of two integers. This was one of the earliest proofs of irrationality, attributed to ancient Greek mathematicians (likely the Pythagoreans). Despite being irrational, √2 is algebraic (a root of x² − 2 = 0) and can be computed to arbitrary precision.

Exact value: √2 = 1.41421356237309504880168872420969807856967187537694…

How to Use This Calculator

The Square Diagonal Calculator supports four input modes, allowing you to compute the diagonal from any known square measurement. Here is a step-by-step guide:

  • Step 1 — Choose input type: Select from Side (s), Diagonal (d), Area (A), or Perimeter (P) using the mode tabs.
  • Step 2 — Enter your value: Type the numeric value in the input field. All standard length units are supported: mm, cm, m, in, ft, yd.
  • Step 3 — Select unit: Use the unit dropdown to match your measurement system. Area inputs are interpreted in unit².
  • Step 4 — Choose precision: Select the number of decimal places (2–10) for output values.
  • Step 5 — Click Calculate Diagonal: The calculator instantly computes the diagonal and all related properties: side, area, perimeter, inradius, circumradius, half-diagonal, and the d/s ratio.
  • Step 6 — Copy results: Click any KPI card to copy its value to clipboard.

All calculations use IEEE 754 double-precision arithmetic with Math.SQRT2 = 1.4142135623730951 (the most accurate 64-bit representation of √2).

All Four Calculation Modes

Each mode solves for all square properties starting from one known value. The inverse formulas used are:

  • From Side (s): d = s√2. All other properties follow: A = s², P = 4s, R = d/2, r = s/2.
  • From Diagonal (d): s = d/√2 = d×√2/2 ≈ 0.70711 × d. Then A = s² = d²/2, P = 4s = 2d√2.
  • From Area (A): s = √A (since A = s²). Then d = √(2A) — the diagonal equals the square root of twice the area.
  • From Perimeter (P): s = P/4. Then d = s√2 = (P/4)√2 = P√2/4 ≈ 0.35355 × P.

All four modes are mathematically equivalent — they all ultimately derive the side length s and then apply d = s√2. The step-by-step derivation panel shows exactly how each intermediate value is computed.

Mathematical Derivation of the Diagonal Formula

The derivation of d = s√2 uses the Pythagorean theorem applied to the right triangle formed by two adjacent sides and the diagonal:

  • A square has four right angles (90° each).
  • Drawing a diagonal creates a right triangle with legs of length s and s, and hypotenuse d.
  • By the Pythagorean theorem: d² = s² + s² → d² = 2s² → d = s√2.

The angle between the diagonal and any side is exactly 45°, since the triangle is a 45-45-90 isosceles right triangle. The interior angles of this triangle are always 45°, 45°, and 90°, regardless of the square's size.

An important consequence: a 45-45-90 triangle has side ratios 1 : 1 : √2. This means if the legs are s, the hypotenuse is s√2. Conversely, if the hypotenuse (diagonal) is d, each leg is d/√2 = d×√2/2 ≈ 0.70711d.

Key Properties and Ratios

Understanding the diagonal unlocks all square properties:

  • Circumscribed circle (circumradius R): The circle passing through all four vertices has radius R = d/2 = s√2/2 ≈ 0.70711s. The diagonal equals the diameter of this circle.
  • Inscribed circle (inradius r): The largest circle that fits inside the square touches all four sides with radius r = s/2.
  • Ratio d/s = √2 ≈ 1.41421: The diagonal is always ~41.42% longer than the side. This ratio is constant for all squares, making it a universal scaling factor.
  • Area from diagonal: A = d²/2. This gives an elegant relationship: doubling the diagonal quadruples the area (since A ∝ d²).
  • Diagonal bisection: Each diagonal is cut into two equal halves (length d/2) at the center. The two diagonals are perpendicular bisectors of each other.
  • Diagonal angle: Each diagonal makes a 45° angle with the sides of the square, and the two diagonals are perpendicular (meeting at 90°) at the center.

Worked Examples

  • Standard tile (30 cm side): d = 30 × √2 ≈ 30 × 1.41421 = 42.426 cm. Area = 900 cm², Perimeter = 120 cm. The diagonal determines the minimum doorframe width needed to pass a square tile through a doorway flat.
  • Monitor screen (diagonal 24 in): Side s = 24 / √2 ≈ 24 / 1.41421 ≈ 16.971 in. Area ≈ 288 in². This is the exact side length of a square with a 24" diagonal.
  • Room floor (area 20 m²): s = √20 = 2√5 ≈ 4.472 m. Diagonal d = √(2 × 20) = √40 = 2√10 ≈ 6.325 m. This is the longest straight-line distance across the room.
  • Square field (perimeter 240 m): s = 240/4 = 60 m. Diagonal d = 60√2 ≈ 84.853 m. A fence post placed at the center is 84.853/2 ≈ 42.43 m from each corner.
  • Microchip die (side 8 mm): d = 8√2 ≈ 11.314 mm. Semiconductor dies are often square; the diagonal determines the minimum circular wafer area needed to contain the die.

Real-World Applications

The diagonal of a square appears in an extraordinary range of fields:

  • Construction and architecture: The "3-4-5 rule" for checking right angles is extended by the square diagonal. Builders use d = s√2 to calculate brace lengths for square door frames, window openings, and wall panels. A square room's corner-to-corner distance determines cable run lengths and HVAC duct routing.
  • Tile and flooring installation: When laying square tiles diagonally (at 45°), the effective tile "width" across the floor is the tile's diagonal, not its side. A 12×12 inch tile laid at 45° spans 12√2 ≈ 16.97 inches across the floor direction — critical for grout line planning and material estimation.
  • Electronics and display screens: Television, monitor, and smartphone screens are measured by diagonal. A square display with a given diagonal d has side s = d/√2 and area A = d²/2. Most screens are not square, but the diagonal formula is fundamental to aspect ratio calculations.
  • CNC machining and woodworking: Cutting a square piece from a circular blank requires the circle radius to be at least d/2 = s√2/2. Conversely, the largest square that fits in a circle of radius R has side s = R√2 and diagonal d = 2R.
  • Sports and athletics: Baseball's "diamond" (infield) is a square with 90-foot sides. The distance from home plate to second base is the diagonal: 90√2 ≈ 127.28 feet — a key measurement for catcher throw distances and infield geometry.
  • Urban grid planning: City blocks in grid-pattern cities (Manhattan, Chicago) are often approximately square. The diagonal distance across a block determines pedestrian shortcut lengths and emergency vehicle routing.
  • Crystallography and materials science: Many crystal lattices have square unit cells. The face diagonal of a face-centered cubic (FCC) lattice equals a√2, where a is the lattice parameter, determining atom-atom contact distances.
  • Pythagorean Theorem Calculator — The diagonal formula d = s√2 is a direct application of the Pythagorean theorem (a² + b² = c²) with a = b = s.
  • Right Triangle Calculator — The square diagonal divides the square into two 45-45-90 right triangles. Solve any right triangle from two known values.
  • Area of a Circle Calculator — The circumscribed circle of a square with side s has radius R = s√2/2 and area π(s√2/2)² = πs²/2.
  • Hexagon Calculator — Compute area, perimeter, apothem, and diagonals of a regular hexagon. Compare how hexagonal and square packing differ in efficiency.
  • Triangle Area Calculator — Each diagonal splits the square into two congruent triangles of area s²/2. Calculate triangle areas for any set of dimensions.
  • Hypotenuse Calculator — The diagonal of a square is the hypotenuse of the 45-45-90 triangle formed by two sides. Use this calculator for any right triangle hypotenuse.

Frequently Asked Questions about Diagonal of a Square Calculator

What is the formula for the diagonal of a square?

The diagonal of a square with side length s is d = s × √2 ≈ 1.41421356 × s. This comes from the Pythagorean theorem: d² = s² + s² = 2s², so d = s√2. Example: s = 10 cm → d = 10 × 1.41421 ≈ 14.142 cm.

How do I find the diagonal of a square if I know its area?

If the area A is known: s = √A, then d = s√2 = √(2A). Example: A = 50 cm² → d = √100 = 10 cm. The diagonal equals the square root of twice the area.

How do I calculate the diagonal from the perimeter?

If the perimeter P is known: s = P/4, then d = P√2/4 ≈ 0.35355 × P. Example: P = 40 m → s = 10 m → d = 10√2 ≈ 14.142 m.

What is the relationship between the diagonal and the circumscribed circle?

The diagonal equals the diameter of the circumscribed circle. Circumradius R = d/2 = s√2/2 ≈ 0.70711s. The largest square inside a circle of radius R has side s = R√2 and diagonal d = 2R.

At what angle does the diagonal cut the sides of a square?

The diagonal makes exactly 45° with each side, forming two 45-45-90 right triangles. The two diagonals meet at 90° (perpendicular bisectors) at the center, each bisecting the 90° corner angles into two 45° angles.

How is the square diagonal used in real life?

Applications include: tile installation (diagonal tiles span s√2), construction (brace lengths = s√2), screen measurement (TV size measured diagonally), baseball (home-to-second = 90√2 ≈ 127.28 ft), crystallography (face diagonal = a√2), and CNC machining (minimum circle radius to contain a square = s√2/2).

🧮 Math calculator