Diagonal Calculator: Find Diagonal Length in Any Rectangle

If you know a rectangle’s length and width, you can compute its diagonal using the Pythagorean Theorem. This Diagonal Calculator calculates the diagonal instantly, with optional unit conversion for common length units.

Whether you’re measuring a screen, planning framing, or finding the longest distance across a room, the diagonal formula stays the same. You just plug in two perpendicular sides and read the result.

What a Diagonal Calculator Does

A diagonal is the straight line from one corner of a rectangle to the opposite corner. Because the diagonal cuts across a right angle formed by length and width, the relationship is a classic right-triangle problem.

This calculator computes the diagonal length d from:

  • L = rectangle length
  • W = rectangle width

Core Formula (Pythagorean Theorem)

For any rectangle, the diagonal is:

d = √(L² + W²)

Where:

  • d is the diagonal length
  • L and W are perpendicular sides

This works for squares too. If L = W, then d = L√2.

Units and Unit Conversion

The diagonal has the same physical unit as the input sides. For example, if you enter centimeters, the output is in centimeters.

If you choose a different output unit, the calculator converts the final diagonal. Typical conversions use these base units:

  • mm (millimeters)
  • cm (centimeters)
  • m (meters)
  • in (inches)
  • ft (feet)

Conversion is done by converting both inputs to a shared base, computing the diagonal, then converting the result to the selected output unit.

How to Use the Diagonal Calculator

  1. Enter Length and Width.
  2. Select the input unit for both values.
  3. Choose the output unit you want the diagonal in.
  4. Click Calculate to see the diagonal.

If you enter invalid values (like blank fields, non-numbers, or negative lengths), the calculator highlights the field and shows an error message.

Practical Examples

Example 1: Screen size (TV/monitor)

Many screens are described by diagonal size, but you may know width and height. Suppose a display has a width of 120 cm and a height of 67.5 cm.

The diagonal is:

d = √(120² + 67.5²) ≈ 137.9 cm

This is the number you’d use when comparing to marketing specs.

Example 2: Framing and layout planning

If you’re building a rectangular frame or laying out tiles, the diagonal often matters for fit and alignment. For a rectangle with 2.4 m by 1.2 m, the diagonal is:

d = √(2.4² + 1.2²) = √(5.76 + 1.44) = √7.20 ≈ 2.68 m

Use this to confirm the longest straight measurement across the shape.

Common Mistakes to Avoid

  • Mixing units: Make sure length and width are in the same unit before calculating.
  • Using the wrong sides: Diagonal uses the two perpendicular sides. Don’t plug in two parallel edges.
  • Negative values: Lengths can’t be negative in real measurements. Enter positive numbers.
  • Forgetting that diagonal is “corner to corner”: It’s not the perimeter or an edge length.

Frequently Asked Questions

What is the formula for a rectangle diagonal?

The diagonal of a rectangle is found with the Pythagorean Theorem. If length is L and width is W, then diagonal d equals square root of L squared plus W squared: d = √(L² + W²). This works for rectangles and squares.

Can I use the diagonal calculator for squares?

Yes. A square is a special case of a rectangle where length equals width. If both sides are S, then the diagonal is d = √(S² + S²) = S√2. Enter the same value for length and width.

Why do I need unit conversion?

Because diagonal length depends on the numeric values you enter. If you measure in inches but want the result in centimeters, conversion must happen consistently. The calculator converts inputs to a shared base, computes the diagonal, then converts the final diagonal into your chosen output unit.

What happens if I enter zero for length or width?

If either side is zero, the shape becomes a line, and the diagonal equals the non-zero side. The formula still works: d = √(L² + 0²) = |L|. The calculator will accept zero and return the correct diagonal.

Is the diagonal always the shortest distance across a rectangle?

Yes. The diagonal is the straight-line distance between opposite corners, so it is the shortest path across the rectangle. Any path that follows edges or curves will be longer than the diagonal. This is why diagonal measurements are used for fit and alignment.

Takeaway

With a Diagonal Calculator, you can turn two perpendicular measurements into a diagonal in seconds. Use d = √(L² + W²) for any rectangle, then convert units if needed.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top