§1What arctan means
Tangent turns an angle into a ratio: tan 45° = 1. Inverse tangent does the opposite: arctan(1) = 45°, or π/4. On the unit circle, tan θ = y/x, and it is also the height where the terminal side meets the vertical line x = 1. The violet segment in the diagram is that height.
§2Domain and range
Tangent can be any real number, so the domain of arctan is all real numbers: there is no input it rejects. The range is the open interval (−90°, 90°), or (−π/2, π/2). The endpoints are left out because tan 90° is undefined. As x grows, arctan(x) gets closer and closer to 90° without reaching it: arctan(1000) ≈ 89.94°.
§3Exact values of arctan
| x | arctan x (deg) | arctan x (rad) |
|---|---|---|
| −√3 | −60° | −π/3 |
| −1 | −45° | −π/4 |
| −√3/3 | −30° | −π/6 |
| 0 | 0° | 0 |
| √3/3 | 30° | π/6 |
| 1 | 45° | π/4 |
| √3 | 60° | π/3 |
√3/3 and 1/√3 are the same number, so both give 30°.
§4All solutions of tan θ = x
Tangent repeats every 180°, not every 360°: the opposite point on the circle has the same ratio y/x. So the solutions are θ = arctan(x) + 180°·k.
tan θ = √3. arctan(√3) = 60° → θ = 60° + 180°·k → 60° and 240° in one turn
§5atan2(y, x) and the quadrant
arctan only sees the ratio y/x, so it cannot tell (1, 1) from (−1, −1): both have ratio 1 and arctan gives 45°. But (−1, −1) is in Quadrant III, at −135° (or 225°). The two-argument function atan2(y, x) keeps the signs of x and y apart and returns the true direction of the point, between −180° and 180°.
atan2(1, −1). arctan(−1) = −45°, but x < 0 and y > 0 → Quadrant II → −45° + 180° = 135°
atan2(−√3, −1). arctan(√3) = 60°, but the point is in Quadrant III → 60° − 180° = −120° (240°)
Most programming languages, including JavaScript and Python, take the arguments in the order atan2(y, x). Spreadsheets such as Excel and Google Sheets use ATAN2(x, y), with x first, so check the order before you copy a formula.
§6Angle of a slope
A line with slope m rises m units for every unit it runs, so its angle with the x-axis is arctan(m). A slope of 1 is a 45° incline, and a road with a 6% grade has slope 0.06 and rises at arctan(0.06) ≈ 3.43°.
§7Common mistakes
- Using arctan(y/x) for a point with x < 0. The answer lands in the wrong quadrant; use atan2.
- Thinking arctan(x) = 1/tan x. The reciprocal of tangent is cotangent.
- Forgetting that the period is 180°: the solutions of tan θ = 1 are 45° and 225°, not 45° and 135°.
- Expecting arctan to reach 90°. It never does; tan 90° is undefined.
§8FAQ
What is arctan of infinity?
arctan(x) approaches 90° (π/2) as x grows without bound, but infinity is not a number you can enter, and the limit is never reached.
What is atan2(0, 0)?
It is undefined in mathematics: the origin has no direction. Some programming languages return 0 by convention, but this calculator reports it as undefined.
Why does atan2 return negative angles?
Its range is (−180°, 180°], so points below the x-axis get negative angles. Add 360° to get the angle in [0°, 360°); the result panel shows both.
How is arctan related to arcsin and arccos?
All three undo a trig function and return a principal value. See the inverse sine and inverse cosine calculators for their ranges.