Lelifi·tools

Cotangent Calculator

Cotangent is cosine divided by sine, which is the same as 1 over tangent. At 30 degrees, 0.8660 / 0.5000 = 1.7321. Cotangent has no value at 0, 180 or 360 degrees, where sine is zero, and it repeats every 180 degrees.

Pick what you have: an angle, a tangent value, a sine, a cosine, or the two legs of a right triangle. The calculator returns cotangent, tangent, sine and cosine for the same angle, plus the mirror angle where the cotangent flips sign.

Enter an angle, a tangent, a sine, a cosine or two sides of a right triangle, and the calculator returns the cotangent plus the angle it belongs to.

By the Lelifi editors ·

Key takeaways

Cotangent repeats every 180 degrees and breaks at 0 and 180Each unit on the vertical axis is one cotangent; the curve runs off the top near 0 and off the bottom near 180-4-224asymptote at 0 degreesasymptote at 180 degreescot 60 = 0.5774cot 120 = -0.577404590135180angle in degrees
Cotangent from 0 to 180 degrees. The curve is 0 at 90 degrees and runs off the frame at both ends, which is what a pole looks like.
A 4/12 roof: cotangent is run divided by riserun 12 ftrise 4 ftrafter face18.43 degreescot 18.43 = 12 / 4 = 3, so 3 inches of run per inch of rise.Pitch 4/12 is a 33.33 percent grade, and the tangent is 0.3333.
A 4/12 roof drawn to scale. The cotangent is the run of 12 feet divided by the rise of 4 feet, which gives 3.
On this page
  1. What cotangent is, in one ratio
  2. Two ways to compute it: 1 / tan and cos / sin
  3. No value at 0, 180 and 360 degrees
  4. Cotangent and tangent, angle by angle
  5. Roof pitch: cotangent is the run per unit of rise
  6. Ramps, grades and the 1:12 limit
  7. From sine or cosine to cotangent, without the angle
  8. Derivative, inverse and four mistakes

What cotangent is, in one ratio

Cotangent answers a plain question about a ramp or a roof: for each unit you climb, how far do you travel across? In a right triangle, cot(theta) = adjacent / opposite. Turn that upside down and you have tan(theta) = opposite / adjacent, so the two functions are reciprocals.

Written with sines and cosines, cot(theta) = cos(theta) / sin(theta). Both definitions are the same statement, because cos / sin = (adjacent / hypotenuse) divided by (opposite / hypotenuse), and the hypotenuse cancels out.

No unit survives that division. A 3-4-5 triangle has a cotangent of 4 / 3 = 1.3333 at the angle whose opposite side is 3, whether the sides are inches, feet or meters. That angle measures 36.87 degrees, since its tangent is 3 / 4 = 0.75 and the angle with a tangent of 0.75 is 36.87 degrees.

One check fits every answer: multiply the tangent by the cotangent and you should get 1. Here 0.75 x 1.3333 = 1.0000. The Texas A&M math team states the same ratio in its chapter on other trigonometric functions.

Two ways to compute it: 1 / tan and cos / sin

A calculator can reach cotangent two ways, and for most angles the two answers agree to the last digit. Route one divides 1 by the tangent: cot 30 = 1 / 0.5774 = 1.7321. Route two divides the cosine by the sine: 0.8660 / 0.5000 = 1.7321. Both land on the square root of 3.

The routes part company where a sine or cosine gets close to zero, because there a tiny rounding error gets multiplied by a huge number. At 90 degrees the cosine is 0 and the sine is 1, so cot 90 = 0 / 1 = 0 exactly. Push the same angle through the tangent instead and the answer depends on how the software rounds tan 90: some tools return a value near 1.6e16, so 1 / tan hands back 6.1e-17 instead of 0. The cotangent is still 0. The display is what went wrong.

At 0, 180 and 360 degrees the problem flips and no route gives a number, because sine is zero. Section 4.14 of the NIST Digital Library of Mathematical Functions defines cot as cos / sin and marks the zeros of sine as the poles of cotangent for exactly that reason.

So: use cos / sin when you start from an angle, and use 1 / tan when a tangent value is what you already have in hand.

No value at 0, 180 and 360 degrees

Cotangent repeats every 180 degrees, not every 360. That shorter period comes straight out of the ratio: adding 180 degrees flips the sign of both cosine and sine, so cos / sin comes back unchanged. cot 30 = 1.7321 and cot 210 = 1.7321, which is the same number one half turn later.

At every multiple of 180 degrees the sine is exactly zero, so cotangent has no value there. Those points are the vertical asymptotes on the graph. Walk toward 0 from above and the value climbs without a ceiling: cot 10 = 5.6713, cot 5 = 11.4301, cot 1 = 57.29, cot 0.1 = 572.96. Walk toward 180 from below and the same wall shows up with the opposite sign: cot 179 = -57.29 and cot 179.9 = -572.96.

Two sides of one point, opposite directions, no meeting place. That is why the answer reads "not defined" at 0, 180, 360 or any negative multiple of 180, instead of printing a large number.

The zeros work the other way around. Cotangent is 0 wherever the cosine is 0, at 90 and 270 degrees, because 0 / 1 = 0. So the zeros of cotangent sit where tangent has its asymptotes, and the asymptotes of cotangent sit where tangent crosses zero. Figure 1 shows the curve and both walls.

Cotangent and tangent, angle by angle

Reciprocals mean one table covers both functions. Read across any row and the two numbers multiply to 1, apart from the rows where one of them has no value at all.

Angle (degrees)TangentCotangent
00.0000not defined
300.57741.7321
451.00001.0000
601.73210.5774
90not defined0.0000
120-1.7321-0.5774
135-1.0000-1.0000
150-0.5774-1.7321
1800.0000not defined
2100.57741.7321
2251.00001.0000
270not defined0.0000
300-1.7321-0.5774
330-0.5774-1.7321
3600.0000not defined

Three patterns fall out of the table. The sign of cotangent always matches the sign of tangent: both are positive in the first and third quadrants, both negative in the second and fourth. The size runs opposite, so a large tangent means a small cotangent. And the blank rows are different rows: 90 and 270 have no tangent but a cotangent of 0, while 0, 180 and 360 have no cotangent but a tangent of 0.

Supplementary angles, the pair that adds to 180 degrees, have cotangents of equal size and opposite sign: cot 30 = 1.7321 while cot 150 = -1.7321. Complementary angles, the pair that adds to 90 degrees, swap roles: cot 30 = tan 60 = 1.7321. That swap is where the prefix in cotangent comes from.

Roof pitch: cotangent is the run per unit of rise

Carpenters describe a roof as rise over run, in inches per foot. A 4/12 roof climbs 4 inches for every 12 inches across, so its tangent is 4 / 12 = 0.3333 and its cotangent is 12 / 4 = 3.0. The cotangent is the number of inches of horizontal run that come with each inch of rise, which is the number a framing square is laid out around.

The angle at the eaves measures 18.43 degrees. Cotangent says nothing about the length of the rafter, since that needs the hypotenuse and belongs to cosecant. It only compares the two legs of the triangle.

Roof pitchTangent, rise over runCotangent, run over riseAngle at the eavesGrade
2/120.166769.4616.67%
4/120.3333318.4333.33%
6/120.5000226.5750.00%
8/120.66671.533.6966.67%
12/121.0000145.00100.00%

Worked check: a shed roof rises 3 feet over a 10 foot run. The cotangent is 10 / 3 = 3.3333 and the pitch is 3 / 10 = 0.30, or 30 percent. The angle measures 16.70 degrees. Shorten the run to 8 feet with the same rise and the cotangent drops to 8 / 3 = 2.6667, while the angle rises to 20.56 degrees. Figure 2 draws the 4/12 case to scale.

Ramps, grades and the 1:12 limit

Ramp slope is usually written as a ratio, and a ratio of run to rise is a cotangent. A 1:12 ramp rises 1 inch for every 12 inches of run, so its cotangent is 12 and its grade is 1 / 12 = 0.0833, or 8.33 percent. The angle of that ramp measures 4.76 degrees.

The 2010 ADA Standards cap new ramp runs at that slope. Section 405.2 requires a running slope not steeper than 1:12, as the US Access Board guide to ramps and curb ramps explains. Steeper runs are limited to existing buildings and short rises.

Sizing example: a 30 inch rise at the maximum 1:12 slope needs 30 x 12 = 360 inches of run, which is 30 feet. The same rise at 1:8, the steepest slope the standards permit in an existing building, needs 30 x 8 = 240 inches, or 20 feet, and the angle goes from 4.76 to 7.13 degrees.

For any grade, divide the run by the rise. A driveway that climbs 2 feet over 24 feet has a cotangent of 12, the same as a legal ramp, and an 8.33 percent grade. A walkway that climbs 2 feet over 16 feet has a cotangent of 8 and a 12.5 percent grade, which is steeper than the ADA limit allows on a new ramp.

From sine or cosine to cotangent, without the angle

A sine plus the Pythagorean identity gives you the cotangent in two steps, with no inverse function needed. Take sin = 0.6. The cosine is the square root of 1 - 0.36 = 0.64, so cos = 0.8 on the positive side, and cot = 0.8 / 0.6 = 1.3333. That angle measures 36.87 degrees.

Sign needs care. A sine of 0.6 also belongs to 143.13 degrees, where the cosine is -0.8 and the cotangent is -1.3333. A ratio alone cannot pick the quadrant, so the calculator reports the base answer and the mirror angle beside it.

A cosine is shorter still: cot = cos / sin, and sin = the square root of 1 - cos squared. For cos = 0.28, sin = 0.96 and cot = 0.28 / 0.96 = 0.2917. That is a 7-24-25 right triangle scaled down by 25.

Triangle, legs and hypotenuseSineCosineTangentCotangentAngle
3-4-50.80000.60001.33330.750053.13
5-12-130.92310.38462.40000.416767.38
8-15-170.88240.47061.87500.533361.93
7-24-250.96000.28003.42860.291773.74

The identity cot squared + 1 = csc squared chains the three reciprocal functions together. Square 1.3333 and you get 1.7777, add 1 for 2.7777, and the square root of 2.7777 is 1.6667, which is 1 / 0.6, the cosecant of the same angle. The check passes.

Derivative, inverse and four mistakes

The derivative of cotangent is minus cosecant squared, a result listed with the other trig derivatives in section 4.16 of the NIST DLMF. At 45 degrees the cosecant is 1.4142, its square is 2, so the slope of the cotangent curve there is -2 radians per radian. That negative slope holds between every pair of asymptotes: cotangent always falls as the angle grows.

Mistake one is the unit. cot 1 in radians is 0.6421, while cot 1 degree is 57.29. The same four keystrokes give answers 89 times apart.

Mistake two is reading cot as the inverse. cot 0.5 radians is 1.8305. The angle whose cotangent is 0.5 measures 63.43 degrees, and the angle whose tangent is 0.5 measures 26.57 degrees. Those three numbers get confused constantly, and the -1 superscript in cot^-1 makes it worse, because it can mean the reciprocal or the inverse depending on the book.

Mistake three is expecting cot 90 to be undefined. It is 0, while tan 90 is the one with no value. Mistake four is a sign slip in the second or fourth quadrant, where sine and cosine disagree and the cotangent comes out negative even though the triangle looks ordinary. Near the asymptotes the sign is the only warning you get.

Frequently asked questions

What is the cotangent of 30 degrees?

cot 30 is 1.7321, the square root of 3. Cosine of 30 degrees is 0.8660 and sine is 0.5, so 0.8660 / 0.5 = 1.7321. The tangent of the same angle is 0.5774, and 1 / 0.5774 lands on the same number.

What is cot 45 degrees?

cot 45 is 1. A 45 degree angle has equal legs, so adjacent divided by opposite is 1. Its tangent is also 1, which makes it the one angle where the two functions meet.

Why is cot 90 equal to 0 and not undefined?

Because cotangent is cos / sin, and at 90 degrees the cosine is 0 while the sine is 1. The division gives 0. Tangent is the one that breaks at 90 degrees, since it divides by a cosine of zero.

Why is cot 180 undefined?

The sine of 180 degrees is 0, so cos / sin becomes -1 / 0 and there is no number to report. 0, 360, -180 and every other multiple of 180 behave the same way.

Is cotangent the same as 1 over tangent?

Yes, wherever the sine is not zero. cot = 1 / tan = cos / sin. One exception: at 90 degrees the tangent has no value, so 1 / tan cannot be evaluated, while the cotangent there is 0.

How do I get cotangent from a sine of 0.6?

Square the sine for 0.36, subtract from 1 for 0.64, and take the square root for a cosine of 0.8. Then 0.8 / 0.6 = 1.3333. The mirror angle of 143.13 degrees has a cotangent of -1.3333 instead.

What is the cotangent of 1 radian?

cot 1 radian is 0.6421. That is a different question from cot 1 degree, which is 57.29. Check the mode indicator on the calculator before trusting either number.

What does cotangent have to do with a 4/12 roof?

The pitch gives the tangent, 4 / 12 = 0.3333, so the cotangent is 12 / 4 = 3. In the field that means 3 inches of horizontal run for every inch of rise, and an angle of 18.43 degrees at the eaves.

How steep is a 1:12 ramp in degrees?

A 1:12 ramp rises 1 inch per 12 inches of run, which is an 8.33 percent grade and an angle of 4.76 degrees. The 2010 ADA Standards allow that as the maximum running slope for a new ramp.

What is the derivative of cotangent?

The derivative is minus cosecant squared, written -csc^2(x). At 45 degrees the cosecant is 1.4142, so the derivative there is -2. Cotangent always slopes downward between its asymptotes.

Does cotangent repeat every 180 or every 360 degrees?

Every 180 degrees. cot 30 and cot 210 are both 1.7321, and cot 390 does the same. Sine and cosine each take 360 degrees to repeat, but their ratio repeats twice as fast because both change sign together.

Can a cotangent be smaller than 1?

Yes. Any real number is possible. cot 60 is 0.5774 and cot 89 is 0.0175. Cotangent is only trapped away from 0 when the angle sits between 45 and 90 degrees.

What is the difference between cotangent and arctangent?

cotangent takes an angle and returns a ratio, while arctangent takes a ratio and returns an angle. cot 0.5 radians is 1.8305, and arctan 0.5 is 26.57 degrees. The angle whose cotangent is 0.5 is 63.43 degrees, the complement of that.

How do I find cotangent without a cot button?

Divide cosine by sine, or divide 1 by the tangent. Both keys exist on almost every calculator and on phones. For a 60 degree angle, 0.5000 / 0.8660 gives 0.5774, which matches 1 / 1.7321.

Spotted a wrong number or a broken result?

More Math tools

See all Math tools

Fee schedules, rates and rules change without notice. Always confirm important figures with the official source before you rely on them.