Polar to Rectangular Converter both directions
Convert a point between polar and rectangular coordinates, in degrees or radians, without losing the quadrant on the way.
Both Ways
Polar to rectangular and back, with the angle unit you choose.
arctan(y/x) Is Not Enough
It loses two quadrants and is undefined at x = 0. This uses atan2.
What are polar and rectangular coordinates?
At a Glance
Rectangular (Cartesian) coordinates locate a point by how far across and how far up: (x, y). Polar coordinates locate the same point by how far away and in what direction: a radius r and an angle θ measured anticlockwise from the positive x-axis.
Going from polar to rectangular is straightforward trigonometry — the radius is the hypotenuse and the two coordinates are its projections:
x = r × cos θ, y = r × sin θThe reverse direction is where implementations go wrong. The radius is easy — it is Pythagoras — but the angle needs more care than arctan(y ÷ x) gives:
r = √(x² + y²), θ = atan2(y, x)A plain arctangent returns an angle in the range −90° to 90°, so it cannot tell (3, 4) from (−3, −4) — both give the same ratio. atan2 takes the signs of x and y separately and returns the correct quadrant, and it is defined at x = 0 where a division would fail. This calculator also normalises the result into 0-360°, so a point below the axis comes back as 270° rather than −90°.
The defaults convert r = 5 at 53.13° back into (3, 4). The interesting cases are the ones a naive formula gets wrong.
First quadrant: (3, 4)
r = √(9 + 16) = 5, θ = 53.13°. Everything agrees here.
Second quadrant: (−3, 4)
The same radius of 5, but θ = 126.87°. A plain arctangent of 4 ÷ −3 would report −53.13° and put the point in the wrong half of the plane.
On the axis: (0, −5)
r = 5, θ = 270°. Dividing y by x here is a division by zero; atan2 handles it directly.
Rounding at the poles
Converting r = 10 at exactly 90° gives y = 10 and x ≈ 1.9 × 10⁻¹⁶ rather than a clean zero — floating-point noise, not an error. Read it as zero.
The conversion itself is exact; the things worth keeping in mind are conventions rather than accuracy.
The angle convention here is the mathematical one — anticlockwise from the positive x-axis, output in 0-360°. Navigation and surveying use bearings measured clockwise from north instead, which is a different number for the same direction. Convert deliberately if you are moving between the two.
Degrees and radians are both exact, but mixing them silently is the most common source of a wrong answer. The unit selector applies to both the angle you enter and the one you get back.
At the origin the angle is undefined. r = 0 describes the origin regardless of θ, so a converted angle there carries no information.
Very small components are floating-point noise. Values around 10⁻¹⁶ appearing where you expect zero are the limits of binary arithmetic, not a mistake in the conversion.
For the distance between two points, use the 2D Distance Calculator; for angle units on their own, the Angle Converter.