Skip to content

Polar Coordinates Calculator

Convert rectangular (x, y) to polar (r, θ) and back, plus cylindrical and spherical coordinates, with exact values.

Your details

Angles in
Angle range

Results update as you type

Result

(r, θ) = (5, 53.130102°)

Exact values
r = 5
r = √(x² + y²)
5
θ in degrees
53.130102 °
θ in radians
0.927295
Position
Quadrant I

Step-by-step solution
  1. r = √(x² + y²) = √(3² + 4²) = 5
  2. θ = atan2(y, x) = atan2(4, 3) = 53.130102° = 0.927295 rad

A point in the plane can be located in two ways. Rectangular (Cartesian) coordinates (x,y)(x, y) say how far to go along each axis; polar coordinates (r,θ)(r, \theta) give the distance rr from the origin and the angle θ\theta measured anticlockwise from the positive x-axis. Polar form is the natural language of circles, rotations, radar and navigation bearings, alternating current and complex numbers (modulus and argument).

This calculator converts in both directions:

  • (x, y) → (r, θ) with the quadrant handled correctly by atan2⁡\operatorname{atan2}, the angle in degrees or radians, and a choice of range: [0,2π)[0, 2\pi) or (−π,π](-\pi, \pi];
  • (r, θ) → (x, y), accepting angles such as π/3 or 3pi/4;
  • 3D: (x, y, z) → cylindrical (r,θ,z)(r, \theta, z) and spherical (ρ,θ,φ)(\rho, \theta, \varphi), and spherical back to (x, y, z).

Whenever the numbers allow it, an exact line shows results such as r=22r = 2\sqrt2, θ=5π4\theta = \frac{5\pi}{4} or x=−23x = -2\sqrt3. For the angle side of the story, see the reference angle calculator; for distances between two points, the distance calculator.

How to use this calculator

  1. Choose the conversion: rectangular → polar, polar → rectangular, 3D → cylindrical/spherical, or spherical → 3D.
  2. Choose degrees or radians, and for results the angle range (0 to 360° or −180° to 180°).
  3. Enter the coordinates. Angles can be typed as numbers or multiples of π (π/6, -3pi/4).
  4. Read the converted point in the headline, then each coordinate separately, the exact values and the steps.

The formula

Rectangular → polar.

r=x2+y2θ=atan2⁡(y,x)r = \sqrt{x^2 + y^2} \qquad \theta = \operatorname{atan2}(y, x)

atan2⁡\operatorname{atan2} is arctan⁡(y/x)\arctan(y/x) corrected for the quadrant: add 180° when x<0x < 0, and handle x=0x = 0 separately. Using arctan⁡(y/x)\arctan(y/x) alone gives the same angle for (1,1)(1, 1) and (−1,−1)(-1, -1) — the most common mistake.

Polar → rectangular.

x=rcos⁡θy=rsin⁡θx = r\cos\theta \qquad y = r\sin\theta

Cylindrical coordinates keep the polar (r,θ)(r, \theta) of (x,y)(x, y) and add zz unchanged. Spherical coordinates (calculus convention, θ\theta = azimuth, φ\varphi = angle from the +z+z axis):

ρ=x2+y2+z2φ=arccos⁡zρx=ρsin⁡φcos⁡θ, y=ρsin⁡φsin⁡θ, z=ρcos⁡φ\rho = \sqrt{x^2 + y^2 + z^2} \qquad \varphi = \arccos\frac{z}{\rho} \qquad x = \rho\sin\varphi\cos\theta,\ y = \rho\sin\varphi\sin\theta,\ z = \rho\cos\varphi

Physics texts and ISO 80000-2 swap the letters: there θ\theta is the angle from +z+z and φ\varphi the azimuth. The formulas are the same.

Worked example

(3, 4) → polar. r=9+16=5r = \sqrt{9 + 16} = 5 and θ=atan2⁡(4,3)\theta = \operatorname{atan2}(4, 3) ≈ 53.13° (0.9273 rad).

(−2, −2) → polar. r=8=22r = \sqrt8 = 2\sqrt2 ≈ 2.83. The point is in quadrant III, so θ=225°=5π4\theta = 225° = \frac{5\pi}{4} in the 0–360° range, or $ heta = -135° = -\frac{3\pi}{4}$ in the −180°–180° range. A plain arctan⁡(−2/−2)=45°\arctan(-2/-2) = 45° would be wrong.

(4, 150°) → rectangular. x=4cos⁡150°=−23x = 4\cos 150° = -2\sqrt3 ≈ −3.46 and y=4sin⁡150°=2y = 4\sin 150° = 2.

(3, 4, 12) → spherical. ρ=9+16+144=13\rho = \sqrt{9 + 16 + 144} = 13, θ\theta ≈ 53.13° as in 2D, and φ=arccos⁡(12/13)\varphi = \arccos(12/13) ≈ 22.62°. In cylindrical coordinates the same point is (5, 53.13°, 12).

Choosing the angle range

The same direction has infinitely many angles: θ\theta, θ+360°\theta + 360°, θ−360°\theta - 360°… Two conventions pick one:

Range Used in (−1, −1) gives
[0,2π)[0, 2\pi) / 0–360° navigation, plotting, most school exercises 225° = 5π/4
(−π,π](-\pi, \pi] / −180°–180° programming (atan2), complex numbers (principal argument) −135° = −3π/4

At the origin r=0r = 0 and the angle is undefined: every θ\theta gives the same point. The calculator says so instead of inventing a value.

Polar coordinates and complex numbers

The complex number z=x+iyz = x + iy has modulus ∣z∣=r|z| = r and argument arg⁡z=θ\arg z = \theta, so converting (x,y)(x, y) to polar form is exactly writing z=r(cos⁡θ+isin⁡θ)=reiθz = r(\cos\theta + i\sin\theta) = re^{i\theta}. Multiplying complex numbers then multiplies the moduli and adds the arguments — the reason electrical engineers write impedances in polar form. Vectors work the same way: magnitude and direction are the polar coordinates of the vector’s components (see the vector calculator).

Frequently asked questions

How do I convert rectangular coordinates to polar coordinates?

Compute r = √(x² + y²) and θ = atan2(y, x). For (3, 4), r = 5 and θ ≈ 53.13°. If you use arctan(y/x) by hand, add 180° when x is negative.

How do I convert polar coordinates to rectangular?

Use x = r cos θ and y = r sin θ. For r = 2 and θ = π/3: x = 1 and y = √3 ≈ 1.7321.

Why does arctan(y/x) give the wrong angle?

arctan only returns angles between −90° and 90°, so it cannot tell (1, 1) from (−1, −1): both give y/x = 1. atan2 looks at the signs of x and y separately and returns the right quadrant.

Can r be negative?

Some textbooks allow (−r, θ) as another name for (r, θ + 180°). This calculator returns r ≥ 0, the standard choice; to enter a negative radius, add 180° to the angle instead.

What is the difference between cylindrical and spherical coordinates?

Cylindrical coordinates are polar coordinates in the xy-plane plus the height z. Spherical coordinates use the straight-line distance ρ from the origin and two angles: the azimuth θ and the angle φ from the +z axis.

Sources

Last updated:

More Math calculators

People also use