Cartesian, Cylindrical and Spherical Coordinates Converter
Convert a point between x–y–z, cylindrical (ρ, φ, z) and spherical (r, θ, φ) coordinates — flat polar too — and see all of them at once.
Results
What this tool does
The same point can be named by three distances (x, y, z), by a distance from an axis, an angle and a height (cylindrical), or by a distance from the origin and two angles (spherical). The one trap is the angle convention: here θ is measured down from the +z axis (0° to 180°) and φ round the z axis from the +x axis, the usual maths and physics way; surveying, geography and some software use elevation from the horizontal instead, which is 90° − θ and is shown too. For flat polar coordinates, choose cylindrical and leave z at zero.
Formula
ρ = √(x² + y²) · r = √(x² + y² + z²) · φ = atan2(y, x) · θ = acos(z ÷ r) · x = r sin θ cos φ · y = r sin θ sin φ · z = r cos θ
Variables
| Symbol | Meaning | Unit |
|---|---|---|
m | Coordinates you are giving | — |
u | First value (x, r or ρ) | — |
v | Second value (y, or the angle θ / φ in degrees) | — |
w | Third value (z, or the angle φ in degrees) | — |
R | r — distance from the origin | — |
TH | θ — angle from the +z axis (0° to 180°) | ° |
PH | φ — azimuth (0° to 360°) | ° |
RH | ρ — distance from the z axis | — |
EL | Elevation above the xy plane | ° |
X | X | — |
Y | y | — |
Z | z | — |
Worked example
- Coordinates you are giving1
- First value (x, r or ρ)3
- Second value (y, or the angle θ / φ in degrees)4
- Third value (z, or the angle φ in degrees)12
- r — distance from the origin13.00000
- θ — angle from the +z axis (0° to 180°)22.6199 °
- φ — azimuth (0° to 360°)53.1301 °
- ρ — distance from the z axis5.00000
- Elevation above the xy plane67.3801 °
- X3.00000
- y4.00000
- z12.00000
Limitations
- The calculation runs at full precision and only the display is rounded. If you copy an intermediate value and retype it, small differences can appear.
- Mixing units is the most common source of error. Convert every input to the units shown next to each field before calculating.