Skip to main content

Perimeter of a Triangle Calculator

Solve perimeter atriangle problems step-by-step with our free calculator. See formulas, worked examples, and clear explanations.

Skip to calculator
Mathematics

Perimeter of a Triangle Calculator

Calculate the perimeter of any triangle from three side lengths. Find semi-perimeter, area, angles, triangle type, altitudes, medians, and circle radii.

Last updated: December 2025Reviewed by NovaCalculator Mathematics Team

Calculator

Adjust values & calculate
5
7
9
Perimeter
21.0000
5 + 7 + 9
Scalene Obtuse Triangle
Area
17.4123
Semi-Perimeter
10.5000
Inradius
1.6583
Side Contribution to Perimeter
a: 23.8%
b: 33.3%
c: 42.9%
Angle A
33.56deg
Angle B
50.70deg
Angle C
95.74deg

Altitudes and Medians

Altitudes
h_a = 6.9649
h_b = 4.9749
h_c = 3.8694
Medians
m_a = 7.6649
m_b = 6.3836
m_c = 4.0927
Circumradius
4.5227
Your Result
Perimeter: 21.0000 | Area: 17.4123 | Type: Scalene Obtuse
Share Your Result
Understand the Math

Formula

P = a + b + c

The perimeter P of a triangle is the sum of all three side lengths a, b, and c. The semi-perimeter s = P/2 is used in Heron's formula to calculate area and in formulas for the inradius and circumradius.

Last reviewed: December 2025

Worked Examples

Example 1: Triangular Garden Border

A triangular garden has sides of 12 feet, 15 feet, and 18 feet. Calculate the perimeter and how much fencing material is needed.
Solution:
Perimeter = 12 + 15 + 18 = 45 feet Semi-perimeter s = 45/2 = 22.5 Area (Heron) = sqrt(22.5 * 10.5 * 7.5 * 4.5) = sqrt(7981.875) = 89.34 sq ft Inradius = 89.34 / 22.5 = 3.97 ft Triangle type: Scalene, Acute
Result: Perimeter = 45 feet of fencing needed. Area = 89.34 sq ft. The triangle is scalene and acute.

Example 2: Equilateral Triangle Perimeter

A triangular sign has all sides equal to 24 inches. Find the perimeter and all properties.
Solution:
Perimeter = 24 + 24 + 24 = 72 inches = 6 feet Area = (sqrt(3)/4) * 24^2 = 249.42 sq inches All angles = 60 degrees Inradius = 249.42 / 36 = 6.928 inches Circumradius = 24 / sqrt(3) = 13.856 inches
Result: Perimeter = 72 inches. Area = 249.42 sq in. All angles 60 deg. R/r ratio = 2 (minimum possible).
Expert Insights

Background & Theory

The Perimeter of a Triangle Calculator applies the following established principles and formulas. Mathematics rests on a hierarchy of number systems, each extending the previous. The natural numbers (1, 2, 3, ...) support counting and ordering. The integers add negative values and zero, enabling subtraction without restriction. The rational numbers, expressible as p/q where p and q are integers and q is nonzero, close the system under division. The real numbers fill the gaps left by irrationals such as the square root of 2 or pi, forming a complete ordered field. The complex numbers, written as a + bi where i is the square root of negative one, complete the algebraic closure of the reals and allow every polynomial to have a root. Prime factorization states that every integer greater than one is uniquely expressible as a product of primes, a result known as the Fundamental Theorem of Arithmetic. Computing the greatest common divisor (GCD) of two integers relies most efficiently on the Euclidean algorithm: repeatedly replace the larger number with the remainder when it is divided by the smaller, until the remainder is zero. The last nonzero remainder is the GCD. The least common multiple (LCM) follows from the identity LCM(a, b) = |a * b| / GCD(a, b). Modular arithmetic defines equivalence classes of integers that share the same remainder under division by a modulus n. Fermat's Little Theorem and Euler's Theorem arise from this structure and underpin modern cryptography. Logarithms are the inverses of exponential functions. If b raised to the power x equals y, then the logarithm base b of y equals x. The natural logarithm uses base e, approximately 2.71828. Combinatorics counts arrangements and selections. The number of ordered arrangements (permutations) of r objects from n distinct objects is nPr = n! / (n - r)!. The number of unordered selections (combinations) is nCr = n! / (r! * (n - r)!). Pascal's triangle arranges these binomial coefficients so that each entry equals the sum of the two entries directly above it. The Fibonacci sequence, defined by F(1) = 1, F(2) = 1, and F(n) = F(n-1) + F(n-2), appears throughout nature and connects deeply to the golden ratio via Binet's formula.

History

The history behind the Perimeter of a Triangle Calculator traces back through the following developments. Mathematics as a systematic discipline traces to ancient Mesopotamia. Babylonian clay tablets dating to around 1800 BCE demonstrate knowledge of quadratic equations, Pythagorean triples, and base-60 arithmetic, suggesting a practical mathematical tradition far preceding Greek formalism. Euclid of Alexandria compiled the Elements around 300 BCE, establishing the axiomatic method that would define rigorous mathematics for over two thousand years. His work organized plane geometry, number theory, and proportion into logically chained propositions derived from a small set of postulates. The algorithm bearing his name for computing GCDs appears in Book VII and remains in use today. In the 9th century, the Persian scholar Muhammad ibn Musa Al-Khwarizmi wrote Al-Kitab al-mukhtasar fi hisab al-jabr wal-muqabala, the treatise whose title gave algebra its name. He systematized the solution of linear and quadratic equations and described procedures that operated on unknowns as objects, a conceptual leap away from purely numerical calculation. Rene Descartes introduced coordinate geometry in 1637 by uniting algebra and Euclidean geometry, allowing curves to be studied through equations. This synthesis set the stage for calculus. Isaac Newton and Gottfried Wilhelm Leibniz independently developed calculus during the 1660s and 1670s, triggering a priority dispute that lasted decades and divided British and Continental mathematicians. Carl Friedrich Gauss proved the Fundamental Theorem of Algebra in 1799, showing that every nonconstant polynomial has at least one complex root. His Disquisitiones Arithmeticae of 1801 established modern number theory. David Hilbert's formalist program at the turn of the 20th century sought to place all of mathematics on an explicit axiomatic foundation, a project that Kurt Godel's incompleteness theorems of 1931 showed to be fundamentally limited. Alan Turing's work in the 1930s on computability introduced the theoretical model of the stored-program computer and linked mathematical logic directly to the limits of algorithmic calculation. His proof that no algorithm can decide in general whether an arbitrary program will halt or run forever placed fundamental boundaries on what mathematics can mechanically determine, and it opened the discipline now known as theoretical computer science.

Share this calculator

Explore More

Frequently Asked Questions

The perimeter of a triangle is the total distance around the outside of the triangle, calculated by adding the lengths of all three sides together. If a triangle has sides of length a, b, and c, then the perimeter P = a + b + c. This is one of the most fundamental measurements in geometry, applicable to any triangle regardless of its type or angle measures. The perimeter represents the total amount of fencing needed to enclose a triangular area, the length of wire needed to outline a triangular shape, or the distance walked if you travel along all three edges. Understanding perimeter is essential for construction, landscaping, material estimation, and numerous practical applications.
The semi-perimeter s = P/2 = (a + b + c) / 2 is half the perimeter and serves as a key component in several important triangle formulas. Its most famous application is in Heron's formula for calculating triangle area: Area = sqrt(s(s-a)(s-b)(s-c)). The semi-perimeter also connects to the inradius through the relationship r = Area / s, and to the exradii through ra = Area / (s-a). In coordinate geometry, the semi-perimeter appears in barycentric coordinate calculations for the incenter. The semi-perimeter provides a natural scale parameter for the triangle, and many formulas become more elegant and symmetric when expressed in terms of s rather than the full perimeter.
The triangle inequality theorem states that the sum of any two sides of a triangle must be greater than the third side. This means for sides a, b, and c: a + b > c, a + c > b, and b + c > a. If any of these conditions fails, the three lengths cannot form a triangle. This theorem is fundamental because it defines which combinations of three lengths are geometrically possible. For example, sides of 3, 4, and 5 form a valid triangle because 3+4 > 5, 3+5 > 4, and 4+5 > 3. However, sides of 1, 2, and 5 cannot form a triangle because 1+2 = 3, which is not greater than 5. The theorem extends to higher dimensions and has applications in metric spaces and graph theory.
When a triangle is defined by vertex coordinates, calculate the perimeter by finding the distance between each pair of vertices using the distance formula and adding them up. For vertices A(x1,y1), B(x2,y2), C(x3,y3): side AB = sqrt((x2-x1)^2 + (y2-y1)^2), side BC = sqrt((x3-x2)^2 + (y3-y2)^2), and side CA = sqrt((x1-x3)^2 + (y1-y3)^2). The perimeter is AB + BC + CA. For example, for vertices at (0,0), (3,0), and (0,4): AB = 3, BC = 5, CA = 4, perimeter = 12. This approach is essential in computer graphics, GIS applications, and computational geometry where shapes are defined by coordinate points rather than direct measurements.
Perimeter and area are related but distinct properties. For a fixed perimeter, the maximum area is achieved by an equilateral triangle, a result known as the isoperimetric inequality for triangles. Specifically, for a triangle with perimeter P, the maximum area is P^2 times sqrt(3) / 36. The relationship Area = r times s (where r is inradius and s is semi-perimeter) directly connects area and perimeter. However, knowing only the perimeter does not uniquely determine the area, as infinitely many triangles can share the same perimeter but have different areas. For example, triangles with sides 3-4-5 and 2-5-5 both have perimeter 12, but their areas are 6 and approximately 4.90 respectively.
Special triangles have simplified perimeter formulas. For an equilateral triangle with side a, the perimeter is simply 3a. For an isosceles triangle with equal sides a and base b, the perimeter is 2a + b. For a right triangle with legs a and b, the perimeter is a + b + sqrt(a^2 + b^2), since the hypotenuse must be calculated. For a 30-60-90 triangle with shortest side a, the sides are a, a times sqrt(3), and 2a, giving perimeter a(3 + sqrt(3)). For a 45-45-90 triangle with legs a, the perimeter is a(2 + sqrt(2)). These simplified formulas save computation time when you know the triangle type and allow quick estimation of material requirements in construction and design.
Educational Note: This calculator is provided for educational and informational purposes. Results are based on the formulas and inputs provided. Always verify important calculations independently. NovaCalculator processes calculator inputs client-side; optional analytics follow visitor consent settings.Reviewed by: NovaCalculator Mathematics Team โ€” Verified against standard mathematical and scientific references. Last reviewed: December 2025. ยฉ 2024โ€“2026 NovaCalculator.

Share this calculator

Formula

P = a + b + c

The perimeter P of a triangle is the sum of all three side lengths a, b, and c. The semi-perimeter s = P/2 is used in Heron's formula to calculate area and in formulas for the inradius and circumradius.

Worked Examples

Example 1: Triangular Garden Border

Problem: A triangular garden has sides of 12 feet, 15 feet, and 18 feet. Calculate the perimeter and how much fencing material is needed.

Solution: Perimeter = 12 + 15 + 18 = 45 feet\nSemi-perimeter s = 45/2 = 22.5\nArea (Heron) = sqrt(22.5 * 10.5 * 7.5 * 4.5) = sqrt(7981.875) = 89.34 sq ft\nInradius = 89.34 / 22.5 = 3.97 ft\nTriangle type: Scalene, Acute

Result: Perimeter = 45 feet of fencing needed. Area = 89.34 sq ft. The triangle is scalene and acute.

Example 2: Equilateral Triangle Perimeter

Problem: A triangular sign has all sides equal to 24 inches. Find the perimeter and all properties.

Solution: Perimeter = 24 + 24 + 24 = 72 inches = 6 feet\nArea = (sqrt(3)/4) * 24^2 = 249.42 sq inches\nAll angles = 60 degrees\nInradius = 249.42 / 36 = 6.928 inches\nCircumradius = 24 / sqrt(3) = 13.856 inches

Result: Perimeter = 72 inches. Area = 249.42 sq in. All angles 60 deg. R/r ratio = 2 (minimum possible).

Frequently Asked Questions

What is the perimeter of a triangle?

The perimeter of a triangle is the total distance around the outside of the triangle, calculated by adding the lengths of all three sides together. If a triangle has sides of length a, b, and c, then the perimeter P = a + b + c. This is one of the most fundamental measurements in geometry, applicable to any triangle regardless of its type or angle measures. The perimeter represents the total amount of fencing needed to enclose a triangular area, the length of wire needed to outline a triangular shape, or the distance walked if you travel along all three edges. Understanding perimeter is essential for construction, landscaping, material estimation, and numerous practical applications.

How is the semi-perimeter used in triangle calculations?

The semi-perimeter s = P/2 = (a + b + c) / 2 is half the perimeter and serves as a key component in several important triangle formulas. Its most famous application is in Heron's formula for calculating triangle area: Area = sqrt(s(s-a)(s-b)(s-c)). The semi-perimeter also connects to the inradius through the relationship r = Area / s, and to the exradii through ra = Area / (s-a). In coordinate geometry, the semi-perimeter appears in barycentric coordinate calculations for the incenter. The semi-perimeter provides a natural scale parameter for the triangle, and many formulas become more elegant and symmetric when expressed in terms of s rather than the full perimeter.

What is the triangle inequality theorem?

The triangle inequality theorem states that the sum of any two sides of a triangle must be greater than the third side. This means for sides a, b, and c: a + b > c, a + c > b, and b + c > a. If any of these conditions fails, the three lengths cannot form a triangle. This theorem is fundamental because it defines which combinations of three lengths are geometrically possible. For example, sides of 3, 4, and 5 form a valid triangle because 3+4 > 5, 3+5 > 4, and 4+5 > 3. However, sides of 1, 2, and 5 cannot form a triangle because 1+2 = 3, which is not greater than 5. The theorem extends to higher dimensions and has applications in metric spaces and graph theory.

How do you find the perimeter of a triangle using coordinates?

When a triangle is defined by vertex coordinates, calculate the perimeter by finding the distance between each pair of vertices using the distance formula and adding them up. For vertices A(x1,y1), B(x2,y2), C(x3,y3): side AB = sqrt((x2-x1)^2 + (y2-y1)^2), side BC = sqrt((x3-x2)^2 + (y3-y2)^2), and side CA = sqrt((x1-x3)^2 + (y1-y3)^2). The perimeter is AB + BC + CA. For example, for vertices at (0,0), (3,0), and (0,4): AB = 3, BC = 5, CA = 4, perimeter = 12. This approach is essential in computer graphics, GIS applications, and computational geometry where shapes are defined by coordinate points rather than direct measurements.

What is the relationship between perimeter and area of a triangle?

Perimeter and area are related but distinct properties. For a fixed perimeter, the maximum area is achieved by an equilateral triangle, a result known as the isoperimetric inequality for triangles. Specifically, for a triangle with perimeter P, the maximum area is P^2 times sqrt(3) / 36. The relationship Area = r times s (where r is inradius and s is semi-perimeter) directly connects area and perimeter. However, knowing only the perimeter does not uniquely determine the area, as infinitely many triangles can share the same perimeter but have different areas. For example, triangles with sides 3-4-5 and 2-5-5 both have perimeter 12, but their areas are 6 and approximately 4.90 respectively.

How do you calculate the perimeter of special triangles?

Special triangles have simplified perimeter formulas. For an equilateral triangle with side a, the perimeter is simply 3a. For an isosceles triangle with equal sides a and base b, the perimeter is 2a + b. For a right triangle with legs a and b, the perimeter is a + b + sqrt(a^2 + b^2), since the hypotenuse must be calculated. For a 30-60-90 triangle with shortest side a, the sides are a, a times sqrt(3), and 2a, giving perimeter a(3 + sqrt(3)). For a 45-45-90 triangle with legs a, the perimeter is a(2 + sqrt(2)). These simplified formulas save computation time when you know the triangle type and allow quick estimation of material requirements in construction and design.

References

Reviewed by Manoj Kumar, Mathematics Educator ยท Editorial policy