Connect via MCP →

Enter Calculation

Formula

Advertisement

Results

Diagonal Angle (from width)
36.87°
angle between the diagonal and the width side
Diagonal length (d) 5
Complement angle (from height) 53.13°

What is the Rectangle Diagonal Angle Calculator?

This tool computes the angle that a rectangle's diagonal makes with its sides, along with the length of that diagonal. Every rectangle has two equal diagonals that cut it into two right triangles. The diagonal forms an angle with the longer or shorter side that depends only on the ratio of the height to the width. This calculator is useful in carpentry, screen geometry (aspect ratios), drafting, and any layout where you need to know how a corner-to-corner line is oriented.

How to use it

Enter the rectangle's width (w) and height (h) in any consistent unit — centimeters, inches, pixels, etc. The result shows the diagonal angle measured up from the width side, the complement angle measured from the height side, and the diagonal length in the same units you entered.

The formula explained

The diagonal is the hypotenuse of a right triangle whose legs are the width and height. By the Pythagorean theorem, the diagonal length is $$d = \sqrt{w^{2} + h^{2}}$$. The angle \(\theta\) from the width side satisfies \(\tan(\theta) = \text{opposite} / \text{adjacent} = h / w\), so $$\theta = \arctan\!\left(\frac{h}{w}\right)$$. The angle from the height side is simply \(90^{\circ} - \theta\), because the two non-right angles of a right triangle always add to \(90^{\circ}\).

Advertisement
Rectangle with width w, height h, diagonal d, and angle theta at corner
The diagonal forms a right triangle with the rectangle's width and height, where \(\theta = \arctan(h/w)\).

Worked example

Take a rectangle 4 units wide and 3 units tall. The diagonal length is $$\sqrt{16 + 9} = \sqrt{25} = 5.$$ The angle from the width side is $$\arctan\!\left(\frac{3}{4}\right) = \arctan(0.75) \approx 36.87^{\circ},$$ and the complement (from the height side) is \(90 - 36.87 = 53.13^{\circ}\). This is the classic 3-4-5 right triangle.

FAQ

Which angle does the main result show? It shows the angle between the diagonal and the width (horizontal) side. The complement row gives the angle from the height side.

What if width is zero? A zero width makes the shape a vertical line, so the diagonal angle is reported as \(90^{\circ}\).

Does it matter which side is wider? No. The formula works for any positive width and height; for a square (\(w = h\)) the diagonal angle is exactly \(45^{\circ}\).

Last updated: