atan2 Calculator
Enter y and x to compute atan2(y, x). This returns the angle of the point (x, y) from the positive x-axis with the correct quadrant.
What is atan2 on a calculator?
The atan2 function is an improved version of arctangent for 2D coordinates. Instead of taking only a ratio, it takes both values separately:
atan2(y, x). That means it can correctly determine the angle in all four quadrants.
If you only use atan(y/x), you lose sign information when x and y are both negative or when x is negative.
atan2 avoids that problem, which is why it is widely used in engineering, navigation, robotics, gaming, and physics.
Why atan2 is better than plain arctan
1) Correct quadrant detection
atan(y/x) cannot tell whether the point is in Quadrant II or Quadrant IV if the ratio is the same.
atan2(y, x) uses both signs to return the correct direction.
2) Handles x = 0 safely
Division by zero is a problem for y/x. But atan2 is defined for axis-aligned points like (0, 5) or (0, -5), giving angles of
90° or -90° (or π/2 and -π/2).
3) Standard in software and calculators
Many coding environments include atan2 directly:
Python, JavaScript, C/C++, MATLAB, Excel, and scientific calculators with advanced function menus.
How to do atan2 manually on a calculator without an atan2 key
If your calculator only has tan-1, you can still compute atan2 by adjusting for quadrant:
- Compute
θ = tan-1(y/x) - If
x > 0, keepθas-is - If
x < 0andy ≥ 0, add 180° - If
x < 0andy < 0, subtract 180° - If
x = 0, angle is +90° fory > 0, -90° fory < 0
This gives the same result as atan2(y, x) in most practical cases.
Worked examples
Example A: y = 3, x = 4
atan2(3, 4) is about 36.87° (or 0.6435 rad). Point is in Quadrant I, so no angle adjustment is needed.
Example B: y = 3, x = -4
Ratio y/x = -0.75 gives a basic arctan near -36.87°, but the point is in Quadrant II.
atan2(3, -4) correctly returns about 143.13°.
Example C: y = -5, x = 0
atan2(-5, 0) is -90° (or -π/2). No division-by-zero issue.
Common mistakes to avoid
- Swapping arguments: Most systems use
atan2(y, x), notatan2(x, y). - Mixing radians and degrees: confirm mode before interpreting results.
- Using atan only: it may produce a mathematically valid angle in the wrong quadrant.
- Ignoring negative angles: many systems return from -180° to +180° by default.
Quick reference
Depending on platform, atan2 output is commonly:
- Radians: from -π to +π
- Degrees: from -180° to +180° (after conversion)
- Optional heading style: 0° to 360° by adding 360 and taking modulo 360
Final thought
If you work with vectors, coordinates, bearings, or directional data, atan2 is the correct tool.
Use the calculator above for instant results, and if your handheld calculator does not include atan2, follow the quadrant rules to reproduce it accurately.