Spherical Coordinates Calculator

Convert a point between rectangular and spherical coordinates (maths convention).

The x-coordinate.

The y-coordinate.

The z-coordinate. The answer is (ρ, θ, φ). The maths convention: θ is the azimuth, measured in the xy-plane from the positive x-axis, and φ is the angle from the positive z-axis. Physics books swap the two letters.

Angle unit

Choose degrees or radians for the angles.

Try

Result

You entered(x,y,z)=(0,0,2)\left(x, y, z\right) = \left(0, 0, 2\right)

(2,0∘,0∘)\displaystyle \left(2, 0^\circ, 0^\circ\right)

On the z-axis the angle θ can be anything; 0 is used.

Decimal

2,0,0\displaystyle 2, 0, 0
Show the work
  1. Spherical coordinates

    Spherical coordinates (ρ,θ,φ)(\rho, \theta, \varphi) locate a point by its distance ρ\rho from the origin and two angles. The distance is the length of the position vector, from Pythagoras in three dimensions.

    ρ=x2+y2+z2=02+02+22=0+0+4=4=2\begin{aligned} \rho &= \sqrt{x^2 + y^2 + z^2} \\ &= \sqrt{0^2 + 0^2 + 2^2} \\ &= \sqrt{0 + 0 + 4} \\ &= \sqrt{4} \\ &= 2 \end{aligned}
  2. Angle in the xy-plane

    The point is on the z-axis, so it has no direction in the xy-plane: θ\theta can be anything, and 0 is used.

    θ=0∘\theta = 0^\circ
  3. Polar angle from the z-axis

    The angle φ\varphi is measured from the positive z-axis, from 0∘0^\circ to 180∘180^\circ. Its cosine is the height divided by the distance ρ\rho, and the inverse cosine gives an angle in exactly that range.

    φ=cos⁡−1zρ=cos⁡−1(22)=0∘\begin{aligned} \varphi &= \cos^{-1}\frac{z}{\rho} \\ &= \cos^{-1}\left(\frac{2}{2}\right) \\ &= 0^\circ \end{aligned}
  4. Spherical-coordinate convention

    In the mathematics convention used here, θ\theta is the azimuth (measured in the xy-plane from the positive x-axis) and φ\varphi is the angle from the positive z-axis. Physics books swap the two letters: there θ\theta is the angle from the z-axis and φ\varphi is the azimuth. Check which your course uses.

  5. Result

    So the spherical coordinates are (ρ,θ,φ)=(2,0∘,0∘)(\rho, \theta, \varphi) = \left(2, 0^\circ, 0^\circ\right).

Worked examples