What is the argument of a complex number?
Every complex number \(z = a + bi\) can be plotted as a point \((a, b)\) in the complex plane. Its argument (also called the phase or amplitude) is the angle that the line from the origin to that point makes with the positive real axis, measured counterclockwise. Together with the modulus \(|z|\), the argument gives the polar form of a complex number: \(z = |z|(\cos\theta + i\cdot\sin\theta)\).
How to use this calculator
Enter the real part a and the imaginary part b of your complex number \(a + bi\). The calculator returns the argument in both radians and degrees, plus the modulus. Negative values are allowed, and the result is placed in the correct quadrant automatically.
The formula explained
A naive approach uses \(\theta = \arctan(b/a)\), but this fails when \(a = 0\) and cannot distinguish quadrants. Instead we use the two-argument function atan2(b, a), which inspects the signs of both \(a\) and \(b\) to return the correct angle in the range \((-\pi, \pi]\). $$\arg z = \operatorname{atan2}\left(\text{Imaginary }b,\ \text{Real }a\right)$$ The modulus is the Euclidean distance \(|z| = \sqrt{a^2 + b^2}\).
Worked example
For \(z = 1 + i\), we have \(a = 1\) and \(b = 1\). Then $$\arg(z) = \operatorname{atan2}(1, 1) = \frac{\pi}{4} \approx 0.7854 \text{ radians} = 45^\circ,$$ and \(|z| = \sqrt{2} \approx 1.4142\). So \(1 + i\) lies on the line \(y = x\) in the first quadrant, exactly as expected.
FAQ
What range does the argument use? By convention the principal value lies in \((-\pi, \pi]\), i.e. -180° to 180°.
What is arg(0)? The argument of zero is undefined; \(\operatorname{atan2}(0, 0)\) returns 0 here, but the angle has no real meaning when \(|z| = 0\).
Why use degrees and radians? Radians are standard in calculus and Euler formula, while degrees are often easier to visualize. Both are provided for convenience.