Altitude of Triangle Calculator – Find All Three Heights Instantly
The altitude of a triangleis a perpendicular line segment drawn from a vertex to the line containing the opposite side. It measures the triangle's height relative to that base. Every triangle has exactly three altitudes — one from each vertex — and this calculator computes all three simultaneously from just the three side lengths, using Heron's formula and the altitude–area relationship.
What Is an Altitude?
Given a triangle with vertices A, B, C and opposite sides a, b, c:
- Altitude hₐ runs from vertex A perpendicular to side a (segment BC), meeting it at the foot Fₐ.
- Altitude h_b runs from vertex B perpendicular to side b (segment CA), meeting it at foot F_b.
- Altitude h_c runs from vertex C perpendicular to side c (segment AB), meeting it at foot F_c.
All three altitudes always intersect at a single point called the orthocenter (H). For an acute triangle H lies inside the triangle; for a right triangle H coincides with the right-angle vertex; and for an obtuse triangle H lies outside the triangle.
The Formula: Heron's Formula and the Altitude–Area Relationship
The most general method for finding all three altitudes uses the triangle's area as an intermediate result. Given side lengths a, b, and c:
s = (a + b + c) / 2 (semi-perimeter)A = √(s × (s − a) × (s − b) × (s − c)) (Heron's formula)hₐ = (2 × A) / ah_b = (2 × A) / bh_c = (2 × A) / c
This relationship comes directly from the basic area formula for a triangle: Area = ½ × base × height, rearranged to height = 2 × Area / base. The calculator also validates the triangle inequality(a + b > c, a + c > b, b + c > a) before computing — if the three sides cannot form a valid triangle, a clear error is shown.
Special Cases and Triangle Types
Certain triangle types produce notable altitude properties:
- Equilateral triangle (a = b = c): All three altitudes are equal in length:
h = (√3 / 2) × a ≈ 0.866 × a. In an equilateral triangle the altitude, median, and angle bisector from every vertex all coincide. - Right triangle (a² + b² = c² where c is the hypotenuse): The two legs are themselves the altitudes to each other. The altitude to the hypotenuse equals
h_c = (a × b) / c— a classical result used in geometric mean proofs. - Isosceles triangle (two equal sides): The altitude from the apex to the unequal base bisects that base, so
h_apex = √(a² − (c/2)²). The two altitudes from the base vertices are equal in length. - Obtuse triangle: The feet of the two shorter altitudes fall outside the sides (on their extensions). The orthocenter lies outside the triangle, on the opposite side of the longest side.
How to Use the Calculator
- Enter the three side lengths a, b, and c. All three must be positive numbers that satisfy the triangle inequality.
- Choose a length unit (mm, cm, m, km, in, ft, or yd). The same unit applies to inputs and outputs.
- Adjust decimal precision (0–10 places) as needed for your application.
- Results appear instantly: hₐ, h_b, h_c, the triangle area, and the semi-perimeter.
- Use the Copy button next to each altitude value to copy it to your clipboard.
- Expand the Step-by-Step Breakdown to see Heron's formula substituted with your values at every stage.
- The SVG diagram shows your triangle drawn to scale with all three dashed altitude lines and right-angle markers at each foot.
Altitudes vs. Medians vs. Angle Bisectors
Students often confuse the three types of cevians (line segments from a vertex). Here is how they differ:
- Altitude: Perpendicular to the opposite side (90° angle at the foot). Meets at the orthocenter.
- Median: Connects a vertex to the midpoint of the opposite side. Meets at the centroid (divides each median 2:1 from the vertex).
- Angle bisector: Bisects the vertex angle into two equal halves. Meets at the incenter (center of the inscribed circle).
In a scalene triangle all three are distinct line segments of different lengths. In an equilateral triangle they all coincide. In an isosceles triangle the altitude from the apex to the unequal base coincides with the median and angle bisector to that base.
Practical Applications
Altitude calculations appear throughout engineering, architecture, and science:
- Architecture and construction: The altitude to the base gives the vertical height of a triangular gable or roof truss, essential for calculating roof pitch, load distribution, and material quantities.
- Structural analysis: Finding the orthocenter and altitudes of a triangular cross-section or truss element helps determine moment arms and stress distributions in structural engineering.
- Geometry education: Altitude problems appear in high school and undergraduate geometry, trigonometry, and calculus courses — from finding triangle areas to proving the geometric mean altitude theorem for right triangles.
- Surveying and GIS: Triangulated terrain models use altitude calculations to estimate vertical heights within triangular facets for elevation profiling and slope analysis.
- Computer graphics: Altitude and orthocenter computations underpin barycentric coordinate systems used in triangle rasterization, texture mapping, and physics simulations on triangular meshes.
Accuracy and Limitations
All calculations use JavaScript's 64-bit floating-point arithmetic (IEEE 754 double precision), providing approximately 15 significant digits. The displayed precision is adjustable from 0 to 10 decimal places. For very flat or degenerate triangles (where one side nearly equals the sum of the other two), floating-point rounding can reduce accuracy — but for all practical geometry and engineering problems the results are more than sufficient. The calculator works entirely in the browser; no data is sent to any server.