Law of Tangents Calculator
Calculate law tangents instantly with our math tool. Shows detailed work, formulas used, and multiple solution methods.
Calculator
Adjust values & calculateFormula
Where a and b are two known sides of the triangle, A and B are the angles opposite those sides, and (A + B) / 2 is found from the angle sum property since A + B = 180 - C. This formula lets you find the unknown angles directly from two sides and the included angle.
Last reviewed: December 2025
Worked Examples
Example 1: SAS Triangle with Sides 7 and 5, Included Angle 60 degrees
Example 2: Isosceles Triangle with Equal Sides
Background & Theory
The Law of Tangents 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 Law of Tangents 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.
Frequently Asked Questions
Formula
(a - b) / (a + b) = tan((A - B) / 2) / tan((A + B) / 2)
Where a and b are two known sides of the triangle, A and B are the angles opposite those sides, and (A + B) / 2 is found from the angle sum property since A + B = 180 - C. This formula lets you find the unknown angles directly from two sides and the included angle.
Worked Examples
Example 1: SAS Triangle with Sides 7 and 5, Included Angle 60 degrees
Problem: Given a triangle with sides a = 7, b = 5, and included angle C = 60 degrees, find angles A and B using the Law of Tangents.
Solution: Half-sum = (A + B) / 2 = (180 - 60) / 2 = 60 degrees\ntan((A - B)/2) = ((7 - 5)/(7 + 5)) * tan(60)\n= (2/12) * 1.7321 = 0.2887\n(A - B)/2 = arctan(0.2887) = 16.1021 degrees\nA = 60 + 16.1021 = 76.1021 degrees\nB = 60 - 16.1021 = 43.8979 degrees
Result: Angle A = 76.1021 degrees, Angle B = 43.8979 degrees, Side c = 6.2450
Example 2: Isosceles Triangle with Equal Sides
Problem: Given a triangle with sides a = 10, b = 10, and included angle C = 40 degrees, verify that the Law of Tangents gives equal angles.
Solution: Half-sum = (180 - 40) / 2 = 70 degrees\ntan((A - B)/2) = ((10 - 10)/(10 + 10)) * tan(70)\n= 0 * 2.7475 = 0\n(A - B)/2 = arctan(0) = 0 degrees\nA = 70 + 0 = 70 degrees\nB = 70 - 0 = 70 degrees
Result: Angle A = 70.0000 degrees, Angle B = 70.0000 degrees (isosceles confirmed)
Frequently Asked Questions
What is the Law of Tangents and how does it differ from the Law of Sines?
The Law of Tangents is a trigonometric identity that relates the sides and angles of a triangle using tangent functions. It states that (a - b) / (a + b) equals tan((A - B) / 2) divided by tan((A + B) / 2). Unlike the Law of Sines, which requires knowing at least one side-angle pair, the Law of Tangents is particularly useful when you know two sides and the included angle (SAS case). It provides a direct way to find the difference between the two unknown angles without needing to use the Law of Cosines first. Historically, it was preferred over the Law of Cosines because it avoids the need for computing square roots and is better suited for logarithmic computation.
When should I use the Law of Tangents instead of the Law of Cosines?
The Law of Tangents is most useful in the SAS (Side-Angle-Side) case, where you know two sides and the included angle. While the Law of Cosines can also solve this case, the Law of Tangents directly gives you the two unknown angles without needing to find the third side first. This can be computationally more efficient and introduces fewer rounding errors in hand calculations. In the era before electronic calculators, the Law of Tangents was strongly preferred because it could be solved entirely with logarithmic tables, whereas the Law of Cosines required extracting a square root. Today, with digital computation, both methods yield equally accurate results, but the Law of Tangents remains valuable for theoretical understanding.
What is the formula derivation behind the Law of Tangents?
The Law of Tangents can be derived from the Law of Sines. Starting with a/sin(A) = b/sin(B), we get a/b = sin(A)/sin(B). Applying the sum-to-product identities, (a - b)/(a + b) = (sin(A) - sin(B))/(sin(A) + sin(B)). Using the identities sin(A) - sin(B) = 2 cos((A+B)/2) sin((A-B)/2) and sin(A) + sin(B) = 2 sin((A+B)/2) cos((A-B)/2), this simplifies to tan((A-B)/2) / tan((A+B)/2). This elegant derivation connects three fundamental trigonometric laws and demonstrates the deep interconnection between sine, cosine, and tangent relationships in triangles.
What are the limitations and edge cases of the Law of Tangents?
The Law of Tangents has several important limitations to consider. First, it requires that the included angle C is strictly between 0 and 180 degrees, exclusive. Second, the sum (a + b) must be positive, which is always true for valid triangles. Third, when a equals b, the formula simplifies trivially as discussed above. Fourth, the tangent function has asymptotes at 90 degrees, which can cause numerical issues when (A + B) / 2 is near 90 degrees (meaning C is near 0). Fifth, very obtuse included angles can lead to one of the unknown angles being very small, potentially causing precision loss. For most practical triangle configurations, the formula works reliably and produces accurate results.
How does the Law of Tangents relate to navigation and surveying?
Historically, the Law of Tangents was one of the most important tools in navigation and land surveying before modern GPS technology. Surveyors frequently encountered the SAS configuration when measuring distances and bearings between landmarks. They could measure two distances from a known point and the angle between them, then use the Law of Tangents to calculate the remaining angles and determine the complete triangle. Because the computation relied solely on multiplication, division, and tangent lookups, it could be performed efficiently using logarithmic tables and mechanical calculators. Even today, the principles behind the Law of Tangents inform geodetic calculations and triangulation methods used in geographic information systems.
Can the Law of Tangents be extended to non-Euclidean geometry?
Yes, the Law of Tangents has analogues in both spherical and hyperbolic geometry, though the formulas are modified to account for curvature. In spherical trigonometry, Napier analogies serve a similar purpose, relating sides and angles of spherical triangles using tangent functions. In hyperbolic geometry, the hyperbolic law of tangents uses hyperbolic tangent functions for the sides while keeping circular tangent functions for the angles. These extended forms are essential in astronomy, where celestial triangles are spherical, and in the theory of relativity, where hyperbolic geometry describes certain spacetime relationships. Understanding the Euclidean version provides a solid foundation for grasping these more advanced generalizations.
References
Reviewed by Manoj Kumar, Mathematics Educator ยท Editorial policy