User Rating 0.0
Total Usage 0 times
Enter a number, expression, or use a preset
θ = arctan(x) Graph
Hover/tap the graph to trace values
Is this tool helpful?

Your feedback helps us improve.

About

Arctangent maps a ratio back to the angle that produced it. Given x = tan(θ), the function arctan(x) returns θ constrained to the interval (π2, π2). This single-argument form loses quadrant information. A surveyor measuring bearing from two displacement components, or a robotics engineer resolving joint angles, needs atan2(y, x) which preserves the full (π, π] range across all four quadrants. Confusing the two forms is a common source of 180° errors in navigation and computer graphics pipelines.

This calculator computes both arctan(x) and atan2(y, x) to arbitrary display precision. Results are given simultaneously in radians, degrees, and as a fraction of π. The interactive graph plots θ = arctan(x) so you can visually confirm the asymptotic behavior approaching ±π2. Note: numerical precision is bounded by IEEE 754 double-precision (~15 significant digits).

arctan arctangent inverse tangent atan2 trigonometry calculator angle calculator

Formulas

The primary definition of arctangent for a single argument:

θ = arctan(x), θ (π2, π2)

Degree conversion from radians:

θdeg = θrad × 180π

The two-argument form atan2(y, x) resolves the correct quadrant:

atan2(y, x) = {
arctan(yx) if x > 0arctan(yx) + π if x < 0, y 0arctan(yx) π if x < 0, y < 0π2 if x = 0, y > 0π2 if x = 0, y < 0

The Taylor series expansion around x = 0 (convergent for |x| 1):

arctan(x) = n=0 (1)n2n + 1 x2n+1

Where θ is the resulting angle, x is the tangent value (input), y and x are Cartesian coordinates in atan2 mode, and n is the summation index.

Reference Data

xarctan(x) radiansarctan(x) degreesFraction of π
−∞π2−90°12
−√3π3−60°13
−1π4−45°14
13π6−30°16
000°0
13π630°16
1π445°14
√3π360°13
+∞π290°12
0.50.4636526.565°0.14758
21.1071563.435°0.35242
51.3734078.690°0.43710
101.4711384.289°0.46828
1001.5608089.427°0.49682
0.10.099675.711°0.03172

Frequently Asked Questions

arctan(x) takes a single ratio and returns an angle in (−π/2, π/2), covering only quadrants I and IV. atan2(y, x) takes two separate coordinates and returns an angle in (−π, π], correctly identifying all four quadrants. Use atan2 whenever you have separate y and x components - for example, converting Cartesian coordinates to polar form in navigation or game physics.
The tangent function has vertical asymptotes at ±π/2, meaning tan(θ) approaches ±∞ as θ approaches those values. Since arctan is the inverse, it asymptotically approaches ±π/2 but never reaches them for any finite input. In IEEE 754 floating-point arithmetic, arctan(10^308) yields a value extremely close to π/2 but still distinct from it by approximately 10^−308.
JavaScript uses 64-bit IEEE 754 doubles, providing roughly 15-17 significant decimal digits. The Math.atan() implementation in modern engines (V8, SpiderMonkey) is accurate to within 1 ULP (unit in the last place). For most engineering applications, this exceeds the required precision. However, when computing arctan of values very close to zero, the result is approximately equal to the input itself (small-angle approximation), and catastrophic cancellation can occur if you then subtract that value from another nearly equal number.
Radians are the natural unit for calculus, physics, and any formula involving angular velocity (ω = dθ/dt) or trigonometric series. Degrees are conventional in surveying, navigation, architecture, and user-facing displays. The conversion factor is exactly 180/π ≈ 57.29578. This calculator provides both simultaneously so you can use whichever your downstream formula requires without manual conversion errors.
Mathematically, atan2(0, 0) is undefined because the origin has no well-defined angle. The IEEE 754 standard specifies that Math.atan2(0, 0) returns 0 in JavaScript, and Math.atan2(-0, -0) returns −π. This calculator flags the (0, 0) case with a warning, since relying on signed-zero behavior is fragile and typically indicates a degenerate input in real applications.
Yes, the complex arctangent is defined as arctan(z) = (1/2i) · ln((1 + iz)/(1 − iz)), but this calculator operates strictly in the real domain. Complex inputs would require a separate implementation handling branch cuts along the imaginary axis at ±i. For real inputs, the result is always a real number in (−π/2, π/2).