Drawings rarely give you every dimension you need at the machine. You get two sides and an angle, or three sides, and you still need the height of a fixture, the length of a bevel, or the offset of a hole. The Universal Triangle Solver in the Shader7 CNC Machinist hub fills in the rest. It runs in your browser, needs no account, and draws the triangle as it solves it so you can see whether the answer makes sense before you use it.
This guide walks through the app screen by screen, then shows the maths it uses and a few jobs where it saves time.
What the solver gives you
Enter any valid set of three values (at least one of them a side) and press Solve Triangle. The app fills in every missing side and angle and also reports:
- Perpendicular altitude (h_c): the height dropped from vertex C onto side c.
- Median (m_c): the line from C to the midpoint of side c.
- Segments p (AD) and q (DB): where the altitude splits side c.
- Area, perimeter and semi-perimeter.
- Type: acute, right or obtuse, plus scalene, isosceles or equilateral.
The canvas on the right redraws the triangle to scale with the altitude and median shown, so a wrong entry is usually obvious at a glance. Copy Summary puts all the results on your clipboard as text, ready to paste into a setup sheet or a message. Clear All resets the form.
Step by step: using the app
- Pick a mode. General Triangle is for any triangle. Right-Angled locks angle C at 90° and relabels the sides as Height (a), Base (b) and Hypotenuse (c), which matches how most people think about right triangles on a drawing.
- Pick the angle unit. Switch between Degrees and Radians. When you change units, the angles you have already entered are converted, so you do not lose your work.
- Enter what you know. Side a is opposite angle A, side b is opposite angle B and side c is opposite angle C. In Right-Angled mode you only need two more values, because C is already known.
- Press Solve Triangle. Calculated values are filled into the empty fields and marked as calculated, so you can still tell which numbers you typed.
- Check the drawing, then copy the summary.
If the values cannot form a triangle (for example, two short sides that do not reach each other, or angles that add up to more than 180°), the app shows an error instead of a number.
The SSA case
Two sides and an angle that is not between them can describe two different triangles. When that happens the solver shows a warning, "Ambiguous Case (SSA): Two valid triangles exist", and displays the acute solution. If your part needs the obtuse version, check the drawing: the second solution has angle B replaced by 180° − B.
The maths inside the app
You do not need to know these formulas to use the solver, but they help you sanity-check a result.
Law of Cosines (used for SSS and SAS):
c² = a² + b² − 2ab·cos(C)
cos(C) = (a² + b² − c²) / (2ab)
Law of Sines (used for ASA, AAS and SSA):
a / sin(A) = b / sin(B) = c / sin(C)
Auxiliary values that appear in the results panel:
| Result | Formula |
|---|---|
| Semi-perimeter s | (a + b + c) / 2 |
| Area (Heron) | √[s(s − a)(s − b)(s − c)] |
| Altitude h_c | 2 × Area / c |
| Median m_c | 0.5 × √(2a² + 2b² − c²) |
| Segment p | (b² + c² − a²) / (2c) |
| Segment q | c − p |
Shop-floor jobs it speeds up
Sine bar stack height
A sine bar forms a right triangle: the roll spacing is the hypotenuse and the gauge block stack is the height. Choose Right-Angled, enter the bar length as Hypotenuse (c) (for example 100 mm) and the setting angle as A. The solver returns Height (a), which is your stack height. For 100 mm and 12°, that is about 20.791 mm.
Taper half-angle
For a taper with large diameter D, small diameter d and length L, the radial drop (D − d)/2 and the length form a right triangle. Enter the drop as Height (a) and the length as Base (b). Angle A is the half-angle you set on the compound slide or program in your toolpath.
Distance between two features
When a drawing gives two holes as distances from a third point plus the angle between them, that is an SAS triangle. Enter the two distances and the included angle in General mode; side c is the straight-line distance you can check with calipers.
Depth from a known slope
The altitude h_c is the perpendicular height from the top vertex to the base. On a V-block, dovetail or angled pocket, it gives you the depth to program or to check with a height gauge.
Tips for reliable results
- Keep units consistent. Sides can be in mm or inches, but all three must use the same unit. Results come back in that same unit.
- Enter only what the drawing gives you. Over-specifying (four or more values) can lead to conflicting inputs. Start from three values and let the app calculate the rest.
- Watch the decimals on angles. A small angle rounding error grows on long sides. Enter angles with as many decimals as the drawing provides.
- Use the diagram as a check. If the drawing on the canvas does not look like the feature on your print, an input is probably in the wrong field.
Worked example: an oblique triangle from a drawing
A bracket drawing gives two edges of a gusset, 80 mm and 65 mm, with 50° between them, and you need the length of the third edge and the height of the gusset.
- Choose General Triangle and Degrees.
- Enter Side a = 80, Side b = 65 and Angle C = 50 (the angle between a and b).
- Press Solve Triangle.
The solver uses the Law of Cosines for the missing side: c² = 80² + 65² − 2 × 80 × 65 × cos 50°, so c ≈ 62.77 mm. It then finds the other angles (A ≈ 77.51°, B ≈ 52.49°), the area (½ × 80 × 65 × sin 50° ≈ 1,991.72 mm²) and the altitude onto side c (2 × area ÷ c ≈ 63.46 mm). The diagram shows a slightly acute triangle, which matches the bracket on the print, so the numbers can go straight onto your setup sheet.
Common mistakes and how to avoid them
- Swapping a side and its opposite angle. Side a must be opposite angle A. If your drawing labels corners differently, write the letters on a sketch first.
- Typing an angle that is not between the two sides. SAS needs the included angle. If the angle is elsewhere, it is an SSA case and the app will warn you if two triangles fit.
- Using a diameter instead of a radius. On circular features, the triangle side is usually the radius. Halve the diameter before entering it.
- Mixing degrees and minutes. 30°15' is 30.25°, not 30.15°. Convert minutes by dividing by 60.
- Forgetting tool radius. The solver gives part geometry. For a toolpath, offset the result by the cutter radius or use cutter compensation on the control.
Checking a result by hand
A quick sanity check catches most input errors:
- The three angles should add up to 180°.
- The longest side must be opposite the largest angle.
- In a right triangle, a² + b² should equal c².
- The altitude can never be longer than either of the two sides that meet at its vertex.
If any of these fail, look again at which field each value went into.
Frequently asked questions
Which combinations of inputs does the solver accept?
Any combination that fixes a triangle: three sides (SSS), two sides and the included angle (SAS), two angles and a side (ASA or AAS), or two sides and a non-included angle (SSA). In Right-Angled mode, C is fixed at 90°, so two more values are enough.
What happens if two triangles fit my inputs?
That is the SSA ambiguous case. The app warns you and shows the acute solution. The other solution uses 180° − B for angle B.
Can I work in radians?
Yes. Switch the unit toggle to Radians. Angles you have already typed are converted for you.
Is my data sent anywhere?
No. The calculation and the diagram run entirely in your browser.
Which other Shader7 tools work well with it?
For circle-based geometry, such as points on a radius at a given angle, use the Angle & Length Calculator. For bolt-hole patterns, use the PCD Generator.
Solve your triangle now
Enter any three known values and get every side, angle, altitude, median, segment split and area, with a live diagram you can copy into your notes.