Skip to main content

Tangent Calculator

Calculate tangent instantly with our math tool. Shows detailed work, formulas used, and multiple solution methods. Get results you can export or share.

Reviewed by Manoj Kumar, Mathematics Educator

Reviewed by Manoj Kumar, Mathematics Educator

Formula

tan(theta) = opposite / adjacent = sin(theta) / cos(theta)

Where theta is the angle in question, opposite is the side across from the angle, adjacent is the side next to the angle (not the hypotenuse). Tangent can also be computed as the ratio of sine to cosine of the same angle.

Worked Examples

Example 1: Finding the Height of a Building

Problem:You stand 50 meters from a building and measure the angle of elevation to the top as 32 degrees. What is the height of the building?

Solution:Using tan(angle) = opposite / adjacent:\ntan(32) = height / 50\nheight = 50 x tan(32)\ntan(32) = 0.6249\nheight = 50 x 0.6249 = 31.24 meters

Result:The building is approximately 31.24 meters tall

Example 2: Calculating a Roof Slope Angle

Problem:A roof rises 4 feet over a horizontal run of 12 feet. What is the angle of the roof slope?

Solution:Using arctan(opposite / adjacent):\ntan(angle) = 4 / 12 = 0.3333\nangle = arctan(0.3333)\nangle = 18.43 degrees

Result:The roof slope angle is approximately 18.43 degrees (a 4:12 pitch)

Frequently Asked Questions

What is the tangent function in trigonometry?

The tangent function is one of the six fundamental trigonometric functions. In a right triangle, tangent of an angle equals the ratio of the length of the opposite side to the length of the adjacent side. Mathematically it is expressed as tan(theta) = opposite / adjacent. The tangent function can also be defined as the ratio of sine to cosine: tan(theta) = sin(theta) / cos(theta). Unlike sine and cosine which are bounded between -1 and 1, the tangent function has no bounds and ranges from negative infinity to positive infinity. It is periodic with a period of 180 degrees or pi radians.

When is the tangent function undefined?

The tangent function is undefined at angles where the cosine equals zero, because tangent is calculated as sine divided by cosine. This occurs at 90 degrees (pi/2 radians), 270 degrees (3pi/2 radians), and all odd multiples of 90 degrees. At these points, the tangent function approaches positive or negative infinity, creating vertical asymptotes on the graph. In practical terms, a 90-degree angle in a right triangle would mean the adjacent side has zero length, making the ratio opposite/adjacent undefined. Understanding these discontinuities is crucial for graphing tangent and solving trigonometric equations correctly.

How do I convert between degrees and radians for tangent calculations?

To convert degrees to radians, multiply the degree value by pi/180. To convert radians to degrees, multiply the radian value by 180/pi. For example, 45 degrees equals pi/4 radians (45 times pi/180 = pi/4), and pi/3 radians equals 60 degrees (pi/3 times 180/pi = 60). Common reference angles include 30 degrees (pi/6), 45 degrees (pi/4), 60 degrees (pi/3), and 90 degrees (pi/2). Most scientific calculators and programming languages require the angle in radians, so this conversion is essential when computing tangent values programmatically.

What are the common tangent values I should memorize?

Several tangent values appear frequently in mathematics and should be memorized. Tan(0) = 0, tan(30) = 1/sqrt(3) which is approximately 0.5774, tan(45) = 1, tan(60) = sqrt(3) which is approximately 1.7321, and tan(90) is undefined. For angles in the second quadrant, tan(120) = -sqrt(3), tan(135) = -1, and tan(150) = -1/sqrt(3). In the third quadrant tangent values become positive again: tan(180) = 0, tan(210) = 1/sqrt(3), tan(225) = 1, tan(240) = sqrt(3). These reference values help you quickly verify calculator results and solve problems mentally.

References

Reviewed by Manoj Kumar, Mathematics Educator · Editorial policy