Arctan Calculator
Arctan of 0.5 is 26.5651 degrees, because the tangent of that angle works out to half. In radians the same answer is 0.4636. The ratio also fits 206.5651 and -153.4349 degrees, so arctan returns the single value inside the -90 to 90 degree window.
Turn a tangent value into an angle in degrees and radians, or turn a rise and a run into a slope angle and a grade. The atan2 mode answers the quadrant question that plain arctan cannot.
| Angle | |
| In radians | |
| Tangent check | |
| Slope as a grade | |
| Direction |
All calculations run in your browser, and nothing you type is uploaded or stored.
Enter a tangent value to get the angle in degrees and radians, or enter a rise and a run to get a slope angle and grade. The atan2 mode keeps the quadrant.
Key takeaways
- arctan turns a ratio back into an angle, and its principal value always sits between -90 and 90 degrees
- arctan(1) is 45 degrees, arctan(0.5774) is 30 degrees, arctan(1.7321) is 60 degrees
- A 1 to 12 ADA ramp is 8.33 percent, which is 4.7636 degrees
- atan2 takes y and x separately so the answer lands in the right quadrant; Excel reverses the argument order
- The series x minus x cubed over 3 plus x to the fifth over 5 gives 26.5547 degrees at x = 0.5, within 0.01 of the truth
On this page
- What arctan answers, and the question it refuses
- Degrees and radians describe the same angle
- Slope, grade and roof pitch read as an angle
- Quadrants: why arctan alone points the wrong way
- Values worth remembering, and two you can derive
- Checking an arctan result without a calculator
- Small angles and steep faces: two ends where intuition slips
- Calculator modes, rounding and three common errors
What arctan answers, and the question it refuses
Tangent takes an angle and returns a ratio. Arctan runs the film backwards: give it the ratio of the opposite side to the adjacent side, and it returns the angle that produced it. A tangent of 0.5 belongs to an angle of 26.5651 degrees, so arctan(0.5) = 26.5651 degrees, or 0.4636 radians.
The catch is that tangent is not one to one. It repeats every 180 degrees, so 26.5651, 206.5651 and -153.4349 all have a tangent of 0.5. A function that returned all of them would not be usable, so arctan is defined to return the single value inside the open interval from -90 to 90 degrees. The NIST Digital Library of Mathematical Functions, section 4.23 calls this the principal value and gives the same range for the complex extension.
What arctan refuses to do is tell you which half of the circle you are in. It only sees a ratio, and a ratio throws away the signs of both legs. If your robot is heading toward the southwest, the ratio still looks like 1.3333, and arctan answers 53.13 degrees, which points northeast. The fix is atan2, covered below.
One boundary case is worth naming: arctan has no answer for a vertical line. As the ratio grows, the angle approaches 90 degrees but never arrives, which is why arctan(1000) is 89.9427 degrees rather than 90.
Degrees and radians describe the same angle
Every result on this page appears in both units, because the two are used by different trades. Degrees split a circle into 360 parts and are the default on drawing tools, phone levels and roof pitch charts. Radians measure the angle by the arc it cuts on a unit circle, so a full turn is 2 pi radians, a half turn is pi, and a right angle is pi ÷ 2.
The conversion is a single factor: multiply degrees by pi and divide by 180 to get radians. A 45 degree angle is 45 × pi ÷ 180 = 0.7854 rad. Going the other way, multiply radians by 180 and divide by pi.
Radians are not a fussier way of writing degrees; they are the unit that makes calculus come out clean. The derivative of arctan is 1 divided by 1 plus x squared, with no pi or 180 floating around, and at x = 1 that slope is 0.5. If the input were in degrees, that derivative would carry a factor of pi ÷ 180 and every physics formula would need the correction.
Since the derivative shrinks as x grows, arctan compresses large ratios into a narrow band. Between x = 10 and x = 100 the ratio changes tenfold, and the angle only moves from 84.2894 to 89.4271 degrees.
Slope, grade and roof pitch read as an angle
The most common use of arctan outside a classroom is turning a slope into an angle. Rise divided by run is a tangent, so the angle is arctan of that ratio, and the grade in percent is the same ratio multiplied by 100.
Take a roof with a 3 in 12 pitch: 3 ÷ 12 = 0.25, and arctan(0.25) = 14.0362 degrees, which is a 25 percent grade. The standard residential pitch of 4 in 12 gives 18.4349 degrees, and a steep 12 in 12 roof gives 45 degrees because the ratio is exactly 1.
A ramp is where the numbers carry legal weight. The 2010 ADA Standards set the maximum running slope for a new ramp at 1 to 12, which is 8.33 percent, and the U.S. Access Board guide to ramps states that limit with the recommendation to build flatter when space allows. In degrees that is arctan(1 ÷ 12) = 4.7636 degrees. A 1 to 8 slope, allowed only for a short rise on an existing site, is 7.125 degrees.
| Rise to run | Grade | Angle | Typical use |
|---|---|---|---|
| 1 to 12 | 8.33 percent | 4.76 degrees | maximum ADA ramp running slope |
| 1 to 8 | 12.5 percent | 7.13 degrees | ADA limit for a short rise on an existing site |
| 2 to 12 | 16.67 percent | 9.46 degrees | low slope roof, driveway apron |
| 3 to 12 | 25 percent | 14.04 degrees | shallow roof, common on porches |
| 4 to 12 | 33.33 percent | 18.43 degrees | the usual residential roof pitch |
| 6 to 12 | 50 percent | 26.57 degrees | steeper residential roof |
| 12 to 12 | 100 percent | 45 degrees | a steep roof, or a 45 degree miter |
Percent grade and degrees diverge fast, which is why mixing them up produces bad ramps. A 25 percent grade sounds mild and is 14 degrees, steep enough that a wheelchair user has to work at it. The conversion is not proportional: 8.33 percent is 4.76 degrees and 100 percent is 45 degrees, not 57.
For a slope given in degrees and a known run, the rise is run times tan(angle). The roof pitch calculator takes that step for rafter lengths, and the slope calculator handles two points, grade and distance together.
Quadrants: why arctan alone points the wrong way
atan2 takes two arguments, y and x, instead of one ratio, and that extra sign is the whole point. It returns the angle of the point (x, y) measured anticlockwise from the positive x axis, in the range from -180 to 180 degrees. With both signs available it can place the point in the correct quadrant.
| x | y | atan2(y, x) | What goes wrong with plain arctan |
|---|---|---|---|
| 3 | 4 | 53.13 degrees | nothing, the ratio is positive and the angle is in the first quadrant |
| -3 | 4 | 126.87 degrees | arctan of -1.3333 returns -53.13 degrees, pointing the opposite way |
| -3 | -4 | -126.87 degrees, or 233.13 | arctan returns 53.13 degrees, into the wrong quadrant |
| 3 | -4 | -53.13 degrees, or 306.87 | arctan returns -53.13 degrees by luck, but loses the sign of x |
Navigation and game code rely on this. A bearing from one point to another is atan2(difference in north, difference in east) converted to degrees and then reduced to the range 0 to 360. Robotic arms, radar displays, joystick direction and camera aim all use the same call.
The argument order is the trap. JavaScript, Python, C and Java all take y first: Math.atan2(y, x). Excel takes x first: ATAN2(x_num, y_num), as Microsoft documents in the ATAN2 function reference. Swap the arguments and the answer mirrors across the diagonal, which looks plausible and is wrong by up to 90 degrees.
This page follows the programming convention and labels the boxes x and y, so a point at x = -3, y = 4 gives 126.87 degrees. The trigonometry calculator goes the other way, from an angle to the sine, cosine and tangent values, when the angle is what you already know.
Values worth remembering, and two you can derive
Three arctan values cover most quick estimates, and all three come from triangles whose sides are in simple ratios. A tangent of 1 comes from a right isosceles triangle, so arctan(1) is 45 degrees. A tangent of 1 ÷ root 3 comes from half an equilateral triangle, so arctan(0.5774) is 30 degrees. A tangent of root 3 comes from the same triangle the other way up, so arctan(1.7321) is 60 degrees.
| Tangent value | Angle in degrees | Angle in radians | Where it shows up |
|---|---|---|---|
| 0 | 0 | 0 | a flat line, a level floor |
| 0.5774, which is 1 ÷ root 3 | 30 | 0.5236 | a 1 to 1.73 slope |
| 1 | 45 | 0.7854 | equal rise and run, a 12 in 12 roof |
| 1.7321, which is root 3 | 60 | 1.0472 | an equilateral triangle cut in half |
| 2 | 63.4349 | 1.1071 | a 2 to 1 taper |
| 10 | 84.2894 | 1.4711 | a near vertical wall |
| 100 | 89.4271 | 1.5608 | the limit of most drawing tools |
Two results look surprising until you check them. arctan(1 ÷ 2) is 26.5651 degrees and arctan(1 ÷ 3) is 18.4349 degrees, and those two add to exactly 45 degrees. The identity behind it is arctan a + arctan b = arctan of (a + b) divided by (1 - ab), which for a = 0.5 and b = 0.3333 gives 0.8333 ÷ 0.8333 = 1, and arctan(1) is 45 degrees.
The other is the flatness at the top. arctan(10) is 84.2894 degrees and arctan(100) is 89.4271 degrees. A ratio ten times larger buys 5.1 degrees, and another factor of ten buys 0.5 degrees. Any measurement with a 5 percent error in that range produces an angle that is wrong by a small fraction of a degree, which is why steep slopes are better described by their ratio than by their angle.
Checking an arctan result without a calculator
The Taylor series for arctan is x minus x cubed over 3, plus x to the fifth over 5, minus x to the seventh over 7, and so on. It converges slowly near the ends of its range but is usable for values up to about 1, which makes it a decent way to check a result you doubt.
Try x = 0.5. The first term is 0.5, the second is 0.5 cubed over 3 = 0.0416667, and the third is 0.5 to the fifth over 5 = 0.00625. Summing the first three terms gives 0.4645833 rad, which is 26.6187 degrees against the true 26.5651, an error of 0.05 degrees. Adding the fourth term, 0.0011161, brings the estimate to 0.4634673 rad, or 26.5547 degrees, and the error drops to 0.01 degrees.
Two identities extend the check to larger values. arctan(x) = 90 degrees minus arctan(1 ÷ x) for positive x, so arctan(10) can be checked as 90 minus 5.7106, which is 84.2894 degrees. And arctan(x) = 2 × arctan of x divided by (1 + root of (1 + x squared)), which halves the argument at the cost of a square root.
A rough slope check works too: the derivative at x is 1 ÷ (1 + x squared), so near x = 0.5 the curve rises about 0.8 radians per unit of x. A change of 0.01 in the ratio should move the angle by about 0.46 degrees.
Small angles and steep faces: two ends where intuition slips
Near zero, arctan(x) is close to x in radians, and the two are often used interchangeably. At x = 0.1 the exact answer is 5.7106 degrees, while treating 0.1 as a radian gives 5.7296 degrees. The gap is 0.33 percent, which is fine for a sight line and too big for a survey.
The approximation improves as the angle shrinks. At x = 0.01 the error falls below 0.02 percent, which is why small angle formulas are standard in optics and astronomy: a one degree tilt is 0.01745 rad, and the tangent and the angle agree to four significant figures.
The other end is harder to work with. As x grows, arctan approaches 90 degrees and the sensitivity of the answer to the input collapses. Suppose a wall is measured 1000 mm out of plumb over a 10 m height: the ratio is 0.1 and the angle is 5.71 degrees. Now suppose the same wall is measured over only 1 m: the ratio is 1 and the angle is 45 degrees, even though the wall is the same. Slope angles are only meaningful together with the baseline they were measured on.
When the ratio becomes extreme, switch methods. If you know the opposite side and the hypotenuse, arcsin returns the angle directly and stays well conditioned near 90 degrees. If you know two sides of a triangle that is not right angled, the law of cosines avoids the problem altogether.
Calculator modes, rounding and three common errors
The first error is a calculator left in the wrong mode. Ask for arctan(1) in radian mode and you get 0.7854, which is correct and looks wrong to anyone expecting 45. The tell is the size of the number: angles in radians are always below 1.5708, so a result above that in radian mode means the inputs are wrong, and a result below 1.5708 in degree mode means you are looking at a nearly flat slope.
The second is using arctan where arcsin belongs. If the two numbers you have are the opposite side and the hypotenuse, their ratio is a sine, not a tangent. Feeding 3 and 5 into arctan gives 30.9638 degrees, and the correct answer from arcsin is 36.8699 degrees, a gap of almost 6 degrees.
The third is rounding the ratio before taking the angle. A slope of 0.0049 per metre rounds to 0.005, and arctan moves from 0.2807 to 0.2865 degrees, a 2 percent error at an angle where a tenth of a degree matters. Keep the ratio at full precision and round the angle at the end.
For output, two decimals is right for construction drawings, four for survey work and printed tables. Anything beyond four decimals claims precision the input rarely has, since a 1 percent error in the ratio already moves a 45 degree angle by about 0.3 degrees.
Frequently asked questions
What does arctan mean?
It is the inverse of the tangent function. Give it a ratio and it returns the angle whose tangent is that ratio, choosing the value between -90 and 90 degrees. arctan(1) is 45 degrees, and arctan(0.5) is 26.5651 degrees.
Is arctan the same as tan to the minus one?
Yes, with one caution. The notation tan^-1 means inverse tangent, not 1 divided by tan. On a calculator the arctan key and the tan^-1 label do the same job, and arctan(1) is 45 degrees while 1 divided by tan(1) is 0.6421.
Why is arctan limited to 90 degrees?
Because tangent repeats every 180 degrees, so a single ratio maps to many angles. Restricting the output to the open interval from -90 to 90 degrees makes the inverse a proper function. Use atan2 when you need the full 360 degree direction.
How do I convert a roof pitch to an angle?
Divide the rise by the run and take arctan. A 4 in 12 pitch is 4 ÷ 12 = 0.3333, and arctan(0.3333) = 18.4349 degrees, which is a 33.33 percent grade.
What angle is a 1 to 12 ramp?
4.7636 degrees, which is 8.33 percent. That is the maximum running slope for a new ramp under the 2010 ADA Standards, and the Access Board recommends building flatter when space permits.
What is the difference between arctan and atan2?
arctan takes one ratio and returns an angle between -90 and 90 degrees. atan2 takes y and x separately and returns the direction of the point across all four quadrants, from -180 to 180 degrees, so it can tell northeast from southwest.
How do I get arctan in degrees?
Take the radian result and multiply by 180, then divide by pi. For 0.4636 rad that is 0.4636 × 180 ÷ 3.14159 = 26.5651 degrees. Most languages return radians only, so the conversion is yours to make.
What is arctan of infinity?
There is no arctan of infinity as a real number, but the limit as the input grows is 90 degrees, or pi ÷ 2 radians. At an input of 1000 the value is already 89.9427 degrees.
Why does arctan of a slope give a different answer from the grade?
They are different units for the same slope. Grade is 100 times the ratio, so a 0.25 ratio is a 25 percent grade and a 14.04 degree angle. Percent grade is not proportional to degrees.
Can arctan be negative?
Yes, for any negative input, and the result sits between -90 and 0 degrees. arctan(-1) is -45 degrees, which is the same slope as 45 degrees descending.
How accurate is arctan x close to zero?
Close to exact. At x = 0.01 the difference between arctan(x) in radians and x itself is below 0.02 percent. At x = 0.1 the gap is 0.33 percent, which is why the small angle approximation is standard in optics.
What is the derivative of arctan?
1 divided by (1 + x squared). At x = 0 the slope is 1, at x = 1 it is 0.5, and at x = 10 it is 0.0099, which is why the curve flattens out at large inputs.
How do I find an angle from rise and run in a spreadsheet?
Use ATAN2(run, rise) for the slope angle, or ATAN(rise/run), then multiply by 180 and divide by PI() to get degrees. Excel puts x first in ATAN2, so the run goes in the first slot and the rise in the second, the reverse of the order used in JavaScript and Python.
Why do two different angles give the same arctan?
Because tangent repeats every 180 degrees. Angles of 26.5651, 206.5651 and -153.4349 all have a tangent of 0.5, and arctan returns the one inside the -90 to 90 degree window.
What arctan value gives 60 degrees?
1.7321, which is the square root of 3. The matching exact values are arctan(1) = 45 degrees and arctan(0.5774) = 30 degrees, and all three come from the same 30-60-90 triangle.
Spotted a wrong number or a broken result?
More Math tools
Fee schedules, rates and rules change without notice. Always confirm important figures with the official source before you rely on them.