keisoku

Cartesian to Spherical Coordinates Converter (x,y,z to r,θ,φ)

Convert Cartesian coordinates (x, y, z) to spherical coordinates (r, θ, φ). Shows the radius r, polar angle (colatitude) θ, and azimuthal angle φ in both degrees and radians.

Input

Convert Cartesian coordinates (x, y, z) to spherical coordinates (r, θ, φ). The polar angle (colatitude) θ and azimuth φ are shown in degrees and radians.

Result

Spherical coordinates (r, θ, φ)

r = 7.071068, θ = 45°, φ = 53.130102°

Radius r

7.071068

Polar angle θ (deg)

45°

Polar angle θ (rad)

0.785398 rad

Azimuth φ (deg)

53.130102°

Azimuth φ (rad)

0.927295 rad

Azimuth φ (0 to 360 deg)

53.130102°


The polar angle θ ranges from 0 to 180 degrees, and the azimuth φ is greater than minus 180 degrees up to 180 degrees. When r is 0, θ and φ are treated as 0.

How it works

  • The radius is found from r = √(x² + y² + z²).
  • The polar angle (colatitude) θ is measured from the z axis as θ = arccos(z / r), ranging from 0 to 180 degrees.
  • The azimuthal angle φ is found in the xy plane as φ = atan2(y, x), which correctly distinguishes all four quadrants. Its range is greater than minus 180 degrees up to 180 degrees.
  • When r is 0, θ and φ are undefined, so they are reported as 0 here.
  • Angles are shown in both degrees and radians, and the azimuth is also given on a 0 to 360 degree scale.

Reviews

Tell us what you think of this calculator.

Write a review

  1. Home
  2. Cartesian to Spherical Coordinates Converter (x,y,z to r,θ,φ)