Right triangle calculator for fabrication: diagonal, squareness, angle and slope
Updated on 20 November 2026
Right triangles are all over fabrication: the diagonal that squares a frame, the knee brace under a shelf, the stair stringer, the roof truss. It is always the same math — the Pythagorean theorem and a little trigonometry — and the calculator does both with shop measurements, in inches or millimeters.
The 45° corner of a square tube frame is the square tube miter, and the post meeting the rail is the square tube tee.
Right triangle calculator
Pick the two values you know — run and rise, run and diagonal, run and angle, diagonal and angle — and type them in. You get the diagonal, the run and the rise, both angles and the slope.
Only paying users can use this calculator
The formula and the worked example are in the text on this page. The calculator, with your own measurements, is part of full access.
The formulas
- Diagonal (Pythagoras)
c = √(a² + b²)a is the run and b the rise, the legs; c is the hypotenuse, the diagonal of an a × b rectangle.
- Base angle
α = atan(b / a)The angle between the run and the diagonal. The top angle is β = 90° − α.
- Rise and diagonal from run and angle
b = a × tan α ; c = a / cos α
- Slope
i = b / a × 100 %100 % is a 45° angle. Roofers say it as rise per 12 of run: 9 in 12 is 75 %.
Worked example: squaring a gate frame
A gate frame 96 × 72 inches:
- Diagonal: √(96² + 72²) = 120", or 10' 0". Both diagonals of the frame must read 120".
- Angle of the diagonal with the run: atan(72 / 96) = 36.87°; with the rise, 53.13°.
- If one diagonal reads 120-1/4" and the other 119-3/4", the frame is out of square: push the corner of the long diagonal until both match.
In millimeters, a 2000 × 1500 mm frame has a 2500 mm diagonal; a stringer with a 3000 mm run at 30° rises 1732.1 mm.
The 3-4-5 rule
Without a calculator, square a corner with the 3-4-5 triangle: mark 3 units along one edge and 4 along the other, from the corner; if the marks are 5 apart, the corner is 90°. Use multiples for accuracy: 3, 4 and 5 feet, or 6, 8 and 10 feet.
Frequently asked questions
- How do I find the diagonal of a rectangle?
- With the Pythagorean theorem: the square root of the sum of the squares of the sides. A 96 × 72 inch frame has a √(96² + 72²) = 120 inch diagonal.
- How do I check a gate frame for square?
- Measure both diagonals, corner to corner: on a square frame they read the same. If one is longer, push its corner until they match.
- How do I find the angle of a right triangle?
- With the arc tangent of rise over run: α = atan(b / a). A 72 inch rise over a 96 inch run is 36.87°.
Parts in this guide
Other guides
- How to develop a cone (frustum) in sheet metal: formula, sector radii and angle, step by step
- Lobster back bend calculator (segmented 90° elbow): gore angles, cut heights and how many plates
- Pipe saddle calculator and development: how to lay out a pipe-to-pipe branch (tee) at 90 and 45 degrees
- Square to round transition: development by triangulation, step by step
- Bend allowance and K-factor calculator, and the neutral axis: why every development uses D − t
- Sheet metal glossary: the terms of marking out and pattern development in plate fabrication
- How we check the Planichapa calculations, and who is behind them
- LITIO alternative: Planichapa develops sheet metal parts in the browser, nothing to install, now that LITIO2 is no longer sold
- How to lay out a miter-cut pipe: paper template, sine wave and ordinate table
- Plate 'n' Sheet alternative: Planichapa develops sheet metal parts in the browser, with the price on the page
- Pipe ovality: a calculator, the formula, a worked example, the limits the codes use and how to measure it in the shop
- Steel plate and sheet metal weight calculator: weight per m² and ft², gauges and stock plate sizes
- MS plate weight chart: kg per square meter, per sq ft and per plate, 1.6 to 50 mm
- MS angle weight chart: kg per meter of equal and unequal angles (IS 808)
- MS pipe size and weight chart: IS 1239 light, medium and heavy, 15 to 150 NB
- Sheet metal gauge chart: gauge to inches and mm for steel, galvanized, stainless and aluminum
- Pipe offset calculator: rolling offsets, travel, run, take-out and pipe cut length
- Baluster spacing calculator: equal gaps for railings, gates and fences
- Cut list calculator for steel bars: tube, angle and flat bar from 20 ft or 6 m sticks
- Arc radius calculator: radius from chord and rise (sagitta), arc length and layout heights
- Taper calculator: taper angle, half angle, taper per foot and ratio
- Sheet metal pattern development software: how to choose, and what changes between a desktop program, a phone app and an online calculator
- Keyway size chart: ANSI B17.1 and DIN 6885 key, shaft and hub keyseat by shaft diameter
- Eccentric and concentric reducers: which one to use and how each one develops on plate
- Roller chain size chart: ANSI, ISO 606, motorcycle and bicycle chain pitch and roller diameter
- Sprocket dimensions: pitch diameter, outside and root diameter, tooth form and a pitch diameter chart
- Bolt circle layout: the position of each hole, the chord between holes and a chord chart
- Chain length and sprocket ratio: the formulas, a worked example and how many links to cut
- Screw flight calculator: the flat blank of a screw conveyor flight (auger), with the formula and a worked example
- Plate rolling calculator: the blank length of a rolled shell, with the formula, a chart and a worked example
- Tube notching template generator: a printable coping template for any tube, angle and offset
- Dished head calculator: depth, volume, blank diameter and weight of torispherical, 2:1 elliptical and hemispherical heads
- Cone template generator: a printable full-size cone template for hoppers, funnels and reducers
- Pie cut calculator for exhaust and tube bends: saw angle, pie lengths and a wrap-around template
- Duct transition layout: square to round duct, centered, offset or flat on one side
- Pipe template, printable at full size: tee saddle, 45° lateral and miter cut for every pipe size from NPS 1/2 to 12
- Register boot layout: from a floor, wall or ceiling register to a round duct, in inches
- Plenum box and plenum transition layout: the sides, the end cap, the collar and the transitions
- Smoker stack and firebox templates: the cuts where pipe meets the cook chamber, in inches
- Laser and plasma cutting cost calculator: the formula, a worked example and how to measure the cut length
- Cutting a flat pattern DXF on your plasma or laser table: layers, kerf and lead-ins in SheetCAM, ProNest and FastCAM
- Tank volume calculator and strapping chart: horizontal and vertical tanks with 2:1, torispherical, hemispherical or flat heads
- Merge collector template generator: a printable cutting template for 2, 3, 4, 6 or 8 into 1
- Dome template generator: printable gores for a dome or a hemisphere in paper, EVA foam or sheet metal
- DIY cyclone dust collector plans: every sheet of the cyclone from the Stairmand proportions, for any duct size
- Cable tray bend: how to make vertical and horizontal 90 and 45 degree bends with a V notch
- How to build a steel stair: working out the steps, the sawtooth stringers and an L or U stair
- Fixed ladder requirements: OSHA rung spacing, the cage and the hoop bar length
- Welding amperage chart: 6011, 6013 and 7018 stick electrodes by size
- Commercial kitchen hood: the gauge, the overhang, the exhaust CFM, the duct and the layout
- Tap drill chart: tap drill sizes for metric, UNC, UNF, BSP and NPT
- Wood stove from sheet metal: the box, the stovepipe, the elbow, the tee, the cap and the roof flashing, with the code rules
- DIY centrifugal blower: size the impeller and the scroll from airflow and pressure