Diagonal do Retângulo
- Created by
- Renato Passos, Eng. de Software
- Reviewed by
- Renato Passos, Eng. de Software
Last updated: Apr 18, 2026
Formula
D = √(b²+h²)
About this calculator
The rectangle diagonal calculator determines the distance between two opposite vertices of a rectangle, given the base and height. The calculation follows the Pythagorean theorem: the diagonal is the hypotenuse of a right triangle formed by the base and height. Simply enter the base and height values in the form and click calculate. The result is displayed in the same unit as the input data.
This tool is useful for construction projects, interior design, carpentry, and other areas requiring precise diagonal measurements. For example, when checking if a rectangular piece of furniture fits in a space, the diagonal helps ensure no obstructions. It is also used in calculations for screens, solar panels, and packaging.
Caution: ensure base and height are in the same unit (meters, centimeters, inches). Negative or zero values will cause an error. The formula assumes a perfect rectangle (90° angles). For irregular shapes, the diagonal may not represent the actual distance between opposite corners.
Frequently asked questions
How to calculate the diagonal of a rectangle with base 10 and height 5?
Use the formula D = √(10² + 5²) = √(100 + 25) = √125 ≈ 11.18 units.
Does the calculator work with any unit of measurement?
Yes, as long as base and height are in the same unit. The result will be in the same unit.
Can I use the calculator for squares?
Yes, a square is a rectangle with equal sides. Just enter the same value for base and height.
What happens if I enter negative values?
The calculator does not accept negative or zero values. Enter only positive values.
Is the diagonal always longer than the base or height?
Yes, the diagonal is always the longest segment in the rectangle, as it is the hypotenuse of the right triangle.