Spherical Coordinates Calculator

Quick answer

The spherical coordinates calculator converts between Cartesian coordinates (x, y, z) and spherical coordinates (r, θ, φ), where θ is the polar angle from the z-axis and φ the azimuth.

r
3
θ (polar angle)
48.189685
φ (azimuth)
63.434949

Spherical coordinates suit anything with a centre: planets, antennas, atomic orbitals, sound fields and geographic positions (latitude is 90° − θ, longitude is φ).

How to use the Spherical Coordinates Calculator

  1. Conversion
  2. x
  3. y
  4. z
  5. r
  6. θ (polar angle from z)
  7. φ (azimuth)

Results update as you type, and everything is calculated in your browser.

How it works

This calculator uses the physics convention (θ from the z-axis, φ in the xy-plane). Swap the names if your textbook uses the mathematics convention.

Inputs explained

Field What to enter
Conversion Choose one: Cartesian → spherical, Spherical → Cartesian
x A number
y A number
z A number
r A number
θ (polar angle from z) Units: °, rad, π rad, grad, turn
φ (azimuth) Units: °, rad, π rad, grad, turn

What each result means

  • r = sqrt([x]^2 + [y]^2 + [z]^2)
  • θ (polar angle) = deg(acos([z]÷sqrt([x]^2 + [y]^2 + [z]^2)))
  • φ (azimuth) = deg(atan2([y], [x]))
  • x = [r]×sin(rad([θ (polar angle from z)]))×cos(rad([φ (azimuth)]))
  • y = [r]×sin(rad([θ (polar angle from z)]))×sin(rad([φ (azimuth)]))
  • z = [r]×cos(rad([θ (polar angle from z)]))

Example values

How the main result changes when x changes and everything else stays at the example values above:

x r
0.5 2.8723
0.75 2.9262
1 3
1.25 3.0923
1.5 3.2016
2 3.4641

Formula

r = √(x² + y² + z²), θ = arccos(z/r), φ = atan2(y, x) x = r sin θ cos φ, y = r sin θ sin φ, z = r cos θ

Worked example

Inputs — Conversion: Cartesian → spherical; x: 1; y: 2; z: 2.
Results — r = 3; θ (polar angle) = 48.189685 °; φ (azimuth) = 63.434949 °.

Key terms

Azimuth
The angle in the xy-plane from the x-axis.

Frequently asked questions

Which angle is which?

Physics: θ from the z-axis, φ around it. Maths textbooks often swap them.

How do spherical coordinates relate to latitude and longitude?

Latitude = 90° − θ, longitude = φ.

What is the volume element?

dV = r² sin θ dr dθ dφ.

What is r for the origin?

0, and the angles are undefined.

Sources

  1. OpenStax – Calculus Volume 3
  2. Wolfram MathWorld – Spherical coordinates

Cite this calculator

Speedy Calculator. (2026). Spherical Coordinates Calculator. Speedy Calculator. https://speedycalculator.com/calculators/math/spherical-coordinates/