The radius is Pythagoras; the angle needs atan2. For (3, 4): radius 5, angle 53.13°. For (−3, −4): radius 5 again, but the angle is 233.13° — not 53.13°. Those two points share the ratio y/x, which is why a page built on atan reports them as the same direction.
Distance and direction
Cartesian coordinates say how far across and how far up. Polar coordinates say how far away and in which direction. Same point, two descriptions.
The radius is a distance from the origin, so it comes straight from Pythagoras and is never negative here. Some texts do allow a negative radius, read as walking backwards along the ray; that describes the same point a second way, and this page does not use it.
Polar is the natural description whenever a problem has rotational symmetry. A circle is r = constant — one equation, one variable — where in cartesian coordinates it is x² + y² = r² and needs both.
Why atan2 exists
The naive formula is θ = arctan(y/x), and it is wrong in half the plane.
The problem is the division. (3, 4) and (−3, −4) both give y/x = 4/3, so arctan returns the same angle for two points on opposite sides of the origin. It has been handed a ratio, and a ratio cannot carry the signs of its parts.
It also fails on the vertical axis. x = 0 makes the division undefined, so (0, 5) — straight up, angle 90°, nothing exotic about it — has to be special-cased.
atan2 takes y and x as two separate arguments precisely so it can look at both signs. That is its entire reason for existing, and it is why every language ships it alongside atan rather than expecting people to build it. Using atan here is one of the most common bugs in graphics and robotics code.
Three dimensions, two radii
Adding a z value gives two extensions, and the difference between them is a radius that means two different things.
Cylindrical keeps the polar pair and adds the height unchanged. Its radius measures out from the z-axis, so it is still √(x² + y²).
Spherical measures out from the origin, so its radius is √(x² + y² + z²), and needs a second angle to say how far down from the z-axis the point sits.
For (1, 2, 2) the cylindrical radius is √5 ≈ 2.24 and the spherical radius is exactly 3. Both are called r in most textbooks, which is why this page names them separately.
Which to use follows the symmetry of the problem: a pipe or a rotating shaft is cylindrical, a planet or a point source is spherical.
The conventions that clash
More of the difficulty here is notation than mathematics, so it is worth being explicit.
Angle range. This page reports 0° to 360°. Most programming languages return −180° to 180° from atan2. The same direction, two names — 233° and −127° are the same way round.
θ and φ. In spherical coordinates, mathematics texts usually make θ the angle around the z-axis and φ the one down from it. Physics texts swap them. ISO 80000-2 sides with the physicists. This page uses the mathematical convention and says so wherever it matters, because a formula copied from the other tradition will be silently wrong.
Degrees or radians. Every trigonometric function in every standard library takes radians. Converting at the boundary and staying in radians inside is the habit that avoids the problem.
Where it gets used
Navigation. A bearing and a distance is a polar coordinate. Converting to cartesian is what lets you add two legs of a journey together.
Graphics and games. Anything that orbits, rotates or radiates is easier in polar. Working out which way an object should face is an atan2 call, and getting it wrong is why something occasionally aims exactly backwards.
Complex numbers. Modulus and argument are a radius and an angle. Multiplication becomes “multiply the radii, add the angles”, which is far easier than the cartesian version.
Signal processing and physics. Amplitude and phase, field strength and direction — both are polar pairs, and the conversion sits at every boundary between the two views.
Sources and methodology
The conversions and the conventions are standard; these are the references.
Method. The angle is computed with atan2 rather than atan, which is not a stylistic choice: atan is given only the ratio y/x and so cannot distinguish a point from its reflection through the origin, and it divides by zero on the vertical axis. The origin is reported as having no defined angle rather than being given zero, because every angle there names the same point. Round-tripping cartesian to polar and back is checked as a property test over three thousand generated points, which catches a quadrant error anywhere rather than only at the four cases a person would pick. That engine is verified on every change against 119 hand-written assertions, including that converting to polar and back recovers the original point across three thousand generated values spanning all four quadrants and both axes. The count and the per-case breakdown are published on the formula verification page.
Read the guide
A complex number in modulus-argument form is a polar coordinate wearing a different name — the Complex Number Calculator works in that notation.