Triangle Calculator is an interactive geometry tool for side-angle relations, area formulas, altitudes, medians, and classical circle geometry in one place.
The stage widget lets you drag vertices, apply constraints, and set side lengths directly. You can also click the incircle or circumcircle in the drawing and define the diameter numerically.
What This Tool Solves
Most triangle pages either list formulas without context or provide a canvas without theory. This page combines both:
- an interactive stage calculator for experimentation
- a compact formula reference for practical work
- a derivation-oriented introduction from Euclidean geometry
Use it for geometry classes, engineering sketches, and quick side-angle consistency checks.
Core Definitions
We use the standard naming convention:
- sides: \(a=|BC|\), \(b=|CA|\), \(c=|AB|\)
- angles: \(\alpha\) at \(A\), \(\beta\) at \(B\), \(\gamma\) at \(C\)
Perimeter and semiperimeter are
\[ u = a+b+c,\qquad s=\frac{a+b+c}{2}. \]The angle sum is
\[\alpha+\beta+\gamma=180^\circ.\]Area and Height Formulas
The area follows from base-height and trigonometric forms:
\[ A=\frac{a h_a}{2}=\frac{b h_b}{2}=\frac{c h_c}{2} \] \[ A=\frac12 bc\sin\alpha=\frac12 ca\sin\beta=\frac12 ab\sin\gamma. \]This gives direct conversions for altitudes:
\[ h_a=\frac{2A}{a},\quad h_b=\frac{2A}{b},\quad h_c=\frac{2A}{c}. \]Cosine Rule and Sine Rule
For SSS and SAS configurations, the cosine rule is fundamental:
\[ a^2=b^2+c^2-2bc\cos\alpha \] \[ b^2=c^2+a^2-2ca\cos\beta \] \[ c^2=a^2+b^2-2ab\cos\gamma. \]For ASA, AAS, and the ambiguous SSA case, the sine rule is central:
\[ \frac{a}{\sin\alpha}=\frac{b}{\sin\beta}=\frac{c}{\sin\gamma}=2R. \]Here \(R\) is the circumradius. The SSA case may yield two valid triangles, one, or none.
Medians and Heron
Median lengths follow from Apollonius:
\[ m_a=\frac12\sqrt{2b^2+2c^2-a^2}, \quad m_b=\frac12\sqrt{2c^2+2a^2-b^2}, \quad m_c=\frac12\sqrt{2a^2+2b^2-c^2}. \]Heron's formula computes area from side lengths only:
\[ A=\sqrt{s(s-a)(s-b)(s-c)}. \]Incircle and Circumcircle
Two radius formulas are used constantly in design and construction:
\[ r=\frac{A}{s},\qquad R=\frac{abc}{4A}. \]Therefore diameters are
\[ d_{\text{in}}=2r,\qquad d_{\text{circ}}=2R. \]In the stage tool, click either circle and set the diameter directly. The triangle scales consistently while preserving shape.
Derivation Highlights
Angle Sum
Draw a line through one vertex parallel to the opposite side. Alternate interior angles reproduce two triangle angles on a straight line, giving the \(180^\circ\) total.
Cosine Rule from Pythagoras
Drop an altitude from one vertex onto the opposite side and express the projected segment with a cosine term. Expanding and collecting terms yields the cosine rule.
Incircle Radius
Connect the incenter to all vertices. The triangle splits into three smaller triangles sharing height \(r\):
\[ A=\frac12 ar+\frac12 br+\frac12 cr=sr \Rightarrow r=\frac{A}{s}. \]Circumradius Formula
Combine
\[A=\frac12bc\sin\alpha\]with
\[a=2R\sin\alpha.\]Eliminate \(\sin\alpha\) and solve for \(R\):
\[R=\frac{abc}{4A}.\]Right Triangles
Everything above holds for triangles in general. The right triangle, with one angle fixed at \(90^\circ\), is important enough to deserve its own closer look, and it comes with some of the oldest results in mathematics. The side opposite the right angle is the hypotenuse; the two sides enclosing the right angle are the legs.
The Pythagorean Theorem
In a right triangle with legs \(a\), \(b\) and hypotenuse \(c\),
\[ \boxed{a^2+b^2=c^2}. \]The result is named after Pythagoras, who lived around 500 BCE, first on Samos and later in southern Italy, but it was known long before him: Mesopotamian clay tablets from around 1800 BCE already record the relation.
Proof. Take four congruent copies of the triangle and arrange them inside a square of side \(a+b\), tilted so that their hypotenuses bound a smaller square in the middle. That inner square has side \(c\), so it has area \(c^2\), and the four triangles together cover \(4\cdot\frac12ab=2ab\), giving
\[ (a+b)^2=c^2+2ab. \]Now rearrange the same four triangles inside the same outer square, pushing them into the corners instead. The uncovered area is unchanged, but this time it splits into two separate squares with sides \(a\) and \(b\):
\[ (a+b)^2=a^2+b^2+2ab. \]Comparing both expressions for \((a+b)^2\) cancels the \(2ab\) term on each side and leaves \(c^2=a^2+b^2\).
The cosine rule from above already contains this as a special case: for \(\gamma=90^\circ\), \(\cos\gamma=0\), and \(c^2=a^2+b^2-2ab\cos\gamma\) collapses directly to the Pythagorean relation.
Euclid's Altitude Theorem
Drop the altitude from the right angle at \(C\) onto the hypotenuse \(AB\), and call its foot \(S\). The altitude has length \(h\), and it splits the hypotenuse into two segments: \(q=|AS|\), adjacent to \(A\), and \(p=|SB|\), adjacent to \(B\), so \(c=p+q\).
The altitude \(h\) onto the hypotenuse \(c=p+q\) creates two smaller right triangles, each similar to the original, which is the basis for the altitude and leg theorems.
Euclid's altitude theorem (Höhensatz) states that
\[ \boxed{h^2=pq}. \]Proof. The altitude splits the original triangle into two right triangles. Applying the Pythagorean theorem to both of them gives
\[ a^2=p^2+h^2,\qquad b^2=q^2+h^2, \]while for the whole triangle \(c^2=(p+q)^2\). Adding the first two equations and using \(a^2+b^2=c^2\):
\[ p^2+h^2+q^2+h^2=(p+q)^2=p^2+2pq+q^2. \]Subtracting \(p^2+q^2\) from both sides leaves \(2h^2=2pq\), and dividing by \(2\) gives \(h^2=pq\).
Euclid's Leg Theorem
The leg theorem (Kathetensatz) relates each leg to the hypotenuse and the segment adjacent to it:
\[ \boxed{a^2=cp},\qquad \boxed{b^2=cq}. \]Proof. Starting from \(a^2=p^2+h^2\) and substituting \(h^2=pq\) from the altitude theorem,
\[ a^2=p^2+pq=p(p+q)=pc. \]The same argument applied to the other leg, using \(b^2=q^2+h^2\), gives \(b^2=qc\). Adding both equations reproduces the Pythagorean theorem once more, since \(pc+qc=(p+q)c=c^2=a^2+b^2\).
Thales' Theorem
All right triangles sharing a hypotenuse \(AB\) place their third vertex \(C\) on a common circle: the one with diameter \(AB\), center \(M=\frac{A+B}2\), and radius \(r=\frac c2\). Equivalently:
If \(C\) lies on a circle with diameter \(AB\), then the angle \(\angle ACB\) is a right angle.
Every third vertex \(C\) on the circle with diameter \(AB\) sees it at a right angle; connecting the center \(M\) to \(C\) splits the picture into two isosceles triangles, since \(MA=MC=MB=r\).
Proof. Connect the center \(M\) to \(C\). Since \(MA=MC=MB=r\), both \(\triangle AMC\) and \(\triangle MCB\) are isosceles, so their base angles agree: \(\angle MAC=\angle MCA=\alpha\) and \(\angle MBC=\angle MCB=\beta\). The angle at \(C\) is their sum, \(\gamma=\alpha+\beta\), and the angle sum of \(\triangle ABC\) gives
\[ \alpha+\beta+\gamma=180^\circ. \]Substituting \(\gamma=\alpha+\beta\) yields \(2(\alpha+\beta)=180^\circ\), so \(\alpha+\beta=90^\circ\), and therefore \(\gamma=90^\circ\).
This is the classical converse used in construction work: to check whether a corner is square, or to erect a perpendicular at a point, it is enough to test whether the point lies on the circle spanned by the two other corners as a diameter.
Equilateral Triangles
An equilateral triangle has all three sides equal, \(a=b=c\). Because the sine rule ties each side to the sine of the angle opposite it, equal sides force equal angles, \(\alpha=\beta=\gamma\), and the angle sum then pins every one of them at exactly \(60^\circ\). Equal angles also make the triangle equiangular, so it counts among the acute triangles (every angle below \(90^\circ\)), and any two equilateral triangles are automatically similar to each other, since matching up their angles is immediate.
The threefold symmetry has a structural consequence: for any one side, the perpendicular bisector, the angle bisector from the opposite vertex, the median to that side, and the altitude onto it all coincide. Applying this to all three sides at once collapses the usual four triangle centers — circumcenter, incenter, centroid, and orthocenter — onto a single common point.
Height
Dropping the altitude from a vertex bisects the opposite side (by the concurrency above) and splits the triangle into two congruent right triangles with legs \(h\) and \(\frac a2\) and hypotenuse \(a\). The Pythagorean theorem gives
\[ h^2+\left(\frac a2\right)^2=a^2, \]so
\[ h^2=a^2-\frac{a^2}{4}=\frac{3a^2}{4}, \]and therefore
\[ \boxed{h=\frac{\sqrt3}{2}a}. \]Area and Perimeter
Substituting this height into the general area formula \(A=\frac12 ah\) gives
\[ A=\frac12 a\cdot\frac{\sqrt3}{2}a=\boxed{\frac{\sqrt3}{4}a^2}, \]and since all three sides are equal, the perimeter is simply \(\boxed{U=3a}\).
Circumradius and Inradius
Since the four triangle centers coincide, the common center lies on every median, and a centroid always divides a median in the ratio \(2:1\) from vertex to midpoint. The distance from the center to a vertex (the circumradius) is therefore \(\frac23h\), and the distance from the center to a side (the inradius) is the remaining \(\frac13h\):
\[ R=\frac23h=\frac23\cdot\frac{\sqrt3}{2}a=\frac{a}{\sqrt3}, \qquad r=\frac13h=\frac13\cdot\frac{\sqrt3}{2}a=\frac{\sqrt3}{6}a. \]The same values also fall out directly from the general circumradius and incircle formulas above once \(a=b=c\), \(A=\frac{\sqrt3}{4}a^2\), and \(s=\frac{3a}{2}\) are substituted:
\[ R=\frac{abc}{4A}=\frac{a^3}{4\cdot\frac{\sqrt3}{4}a^2}=\frac{a}{\sqrt3}, \qquad r=\frac{A}{s}=\frac{\frac{\sqrt3}{4}a^2}{\frac{3a}{2}}=\frac{\sqrt3}{6}a. \]Combining both radii with the height gives two relations that hold only in the equilateral case:
\[ \boxed{R=2r}, \qquad \boxed{h=R+r=\tfrac32R=3r}. \]Since \(\alpha=\beta=\gamma=60^\circ\), any expression built purely from the three angles collapses to a single number as well, for instance \(\cos\alpha+\cos\beta+\cos\gamma=3\cos60^\circ=\frac32\) and \(\sin\frac\alpha2\sin\frac\beta2\sin\frac\gamma2=\sin^3 30^\circ=\frac18\).
Practical Notes
- If constraints are active, dragging keeps the geometric condition as far as numerical stability allows.
- Near-degenerate triangles are rejected to avoid unstable measurements.
- Circle clicks only work while the corresponding circle overlay is enabled.
This combination of interaction and derivation is intended to make triangle math both reliable and understandable, not just a black-box calculator.