Paritian

Mathematics

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

r — distance from the origin 13.00000
θ — angle from the +z axis (0° to 180°) 22.6199 °
φ — azimuth (0° to 360°) 53.1301 °
ρ — distance from the z axis 5.00000
Elevation above the xy plane 67.3801 °
X 3.00000
y 4.00000
z 12.00000

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

SymbolMeaningUnit
mCoordinates you are giving—
uFirst value (x, r or ρ)—
vSecond value (y, or the angle θ / φ in degrees)—
wThird value (z, or the angle φ in degrees)—
Rr — distance from the origin—
THθ — angle from the +z axis (0° to 180°)°
PHφ — azimuth (0° to 360°)°
RHρ — distance from the z axis—
ELElevation above the xy plane°
XX—
Yy—
Zz—

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.