# Spherical Coordinates Calculator

URL: https://speedycalculator.com/calculators/math/spherical-coordinates/
Last updated: 2026-10-30

> 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.

## Inputs

- Conversion
- x
- y
- z
- r
- θ (polar angle from z) (°, rad, π rad, grad, turn)
- φ (azimuth) (°, rad, π rad, grad, turn)

## Results

- r
- θ (polar angle)
- φ (azimuth)
- x
- y
- z

## Formula

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

## Explanation

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

- **Conversion**
- **x**
- **y**
- **z**
- **r**
- **θ (polar angle from z)**
- **φ (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

FieldWhat to enterConversionChoose one: Cartesian → spherical, Spherical → CartesianxA numberyA numberzA numberrA 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:

xr0.52.87230.752.9262131.253.09231.53.201623.4641

## 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.

## FAQ

**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

- [OpenStax – Calculus Volume 3](https://openstax.org/details/books/calculus-volume-3)
- [Wolfram MathWorld – Spherical coordinates](https://mathworld.wolfram.com/SphericalCoordinates.html)
