Intermediate

Spherical Coordinates Calculator — Cartesian ↔ Spherical Conversion

Convert a 3-D point between Cartesian (x, y, z) and spherical (r, θ, φ) coordinate systems in both directions. Uses the physics convention: θ is the polar angle from the +z axis (0°–180°) and φ is the azimuthal angle in the xy-plane (0°–360°).

Conversion direction

r
5

Radial distance from the origin

r
5
θ (polar)
90° (1.570796 rad)
φ (azimuthal)
53.1301° (0.927295 rad)
x
3
y
4
z
0
ρzrHorizontal distance ρ = √(x²+y²), vertical z, and radial r in the meridian plane
Step by step
  1. 1

    Sum of squares

    3² + 4² + 0² = 25
  2. 2

    Radial distance r

    √25 = 5
    r = √(x² + y² + z²) — straight-line distance from the origin.
Results are estimates for general information only and are not professional advice — always verify important results independently before relying on them. Read the full disclaimer.
Quick answer

How does this calculator work?

Given (x, y, z): r = √(x²+y²+z²), θ = arccos(z/r) ∈ [0°, 180°], φ = arctan2(y, x) adjusted to [0°, 360°]. Reverse: x = r sinθ cosφ, y = r sinθ sinφ, z = r cosθ. Uses the physics (r, θ, φ) convention where θ is the polar angle from +z.

Formula
r = √(x²+y²+z²) • θ = arccos(z/r) • φ = arctan2(y, x) • x = r sinθ cosφ • y = r sinθ sinφ • z = r cosθ
How this is calculated

Spherical coordinates locate a point in 3-D space by its distance r from the origin and two angles. The polar angle θ (inclination) measures how far the point is from the +z axis: 0° is the north pole, 90° lies in the equatorial plane, and 180° is the south pole. The azimuthal angle φ is the rotation around the z-axis measured from the +x axis counter-clockwise when viewed from above. This is the physics convention (r, θ, φ); mathematicians sometimes swap the roles of θ and φ — always check which your textbook uses.

From Cartesian to spherical: r = √(x²+y²+z²), θ = arccos(z/r), φ = arctan2(y, x) shifted to [0°, 360°]. From spherical back to Cartesian: x = r sinθ cosφ, y = r sinθ sinφ, z = r cosθ.

Singularities: at the origin (r = 0) the angles are undefined. On the z-axis (x = y = 0), the azimuthal φ is indeterminate; the calculator returns φ = 0° by convention. The vector diagram shows the horizontal projection ρ = √(x²+y²), the vertical component z, and the resultant r in the meridian plane — a geometric check of the conversion.

Frequently asked questions

In physics the order is (r, θ, φ) with θ as the polar angle from +z and φ as the azimuthal angle in the xy-plane. In many mathematics texts the symbols are swapped: θ is the azimuthal and φ is the polar. The formulas differ accordingly; always verify which convention is in use before plugging in numbers.

arctan2(y, x) returns a value in [−π, π]. This calculator automatically adds 2π (360°) to any negative result so that φ is always reported in [0°, 360°].

They appear whenever a problem has spherical symmetry: hydrogen atom wave functions in quantum mechanics, gravitational and electrostatic potentials, antenna radiation patterns, and the spherical harmonics Yₗᵐ used in seismology and computer-graphics environment maps.

Also known as

cartesian to spherical coordinates converter
spherical to cartesian conversion
r theta phi coordinate calculator
polar azimuthal angle 3d point
3d coordinate system transform
inclination azimuth radius calculator
physics spherical coordinate convention

APA

TG we-Calculate Editorial Team. (2026). Spherical Coordinates Calculator — Cartesian ↔ Spherical Conversion [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/spherical-coordinates-calculator

Chicago

TG we-Calculate Editorial Team. "Spherical Coordinates Calculator — Cartesian ↔ Spherical Conversion." TG we-Calculate. 2026. https://we-calculate.com/calculator/spherical-coordinates-calculator.

IEEE

TG we-Calculate Editorial Team, "Spherical Coordinates Calculator — Cartesian ↔ Spherical Conversion," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/spherical-coordinates-calculator

BibTeX

@misc{wecalculate_spherical_coordinates_calculator, title = {Spherical Coordinates Calculator — Cartesian ↔ Spherical Conversion}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/spherical-coordinates-calculator}}, year = {2026}, note = {TG we-Calculate} }

Did this calculator help you?