Diagonal Calculator

Real-time diagonal calculations for geometric shapes with live visualizations

Real-Time 100% Accurate
Shape Parameters
cm
cm
Calculation Results
Primary Diagonal
11.66 cm
Formula: √(length² + width²)
Secondary Diagonal
11.66 cm
Same as primary for rectangle
Perimeter: 32.00 cm
Area: 60.00 cm²
Aspect Ratio: 1.67:1
Shape Visualization
Rectangle visualization with diagonal shown in red
Calculation History
Rectangle 11.66 cm
10 × 6 cm
Quick Calculations
Shape Properties
Share Tool

How to Calculate Diagonals of Geometric Shapes

Understanding Diagonal Calculations

A diagonal is a straight line connecting two non-adjacent vertices of a polygon or polyhedron. Calculating diagonals is essential in geometry, construction, design, and various technical fields.

Rectangle and Square Diagonals

For rectangles and squares, the diagonal can be calculated using the Pythagorean theorem: d = √(l² + w²), where l is length and w is width. For squares, since length equals width, the formula simplifies to d = s√2, where s is side length.

Cube and Cuboid Diagonals

For 3D shapes like cubes and cuboids, you need to calculate the space diagonal. The formula is d = √(l² + w² + h²), where h is height. This diagonal runs from one corner of the 3D shape to the opposite corner, passing through the interior space.

Regular Polygon Diagonals

The number of diagonals in a regular polygon with n sides is calculated using n(n-3)/2. The length of each diagonal depends on the side length and the specific vertices being connected.

Practical Applications

Diagonal calculations are used in numerous real-world applications:

  • Construction: Ensuring square corners in building foundations
  • Technology: Determining screen sizes (measured diagonally)
  • Design: Creating accurate layouts and patterns
  • Engineering: Calculating material stresses and structural integrity

Using Our Diagonal Calculator

Our real-time diagonal calculator simplifies these complex calculations:

  1. Select the shape type from the dropdown menu
  2. Enter the required dimensions (these change based on the selected shape)
  3. Choose your preferred measurement unit
  4. View instant results with visualizations
  5. Save calculations to history for future reference

The calculator supports multiple shapes including rectangles, squares, cubes, cuboids, regular polygons, rhombuses, and parallelograms. All calculations are performed in real-time, with results shown to your selected precision level.

Tips & Tricks
  • Use decimal values for precise measurements
  • Check visualization to understand diagonal orientation
  • Save frequent calculations to history
  • Use quick calculations for common aspect ratios
  • Adjust precision based on your needs
  • Compare different shapes using the history panel
Formulas Used

Rectangle/Square: d = √(l² + w²)

Cube: d = s√3

Cuboid: d = √(l² + w² + h²)

Regular Polygon: d = s × [sin(180°(k-2)/n) / sin(180°/n)]

Rhombus: d₁ = 2s·sin(θ/2), d₂ = 2s·cos(θ/2)