dash–calculator

01 Vectors and Coordinates

Convert to Spherical Coordinates Calculator

Readout 01-0021 · Updated · Standard formula, shown below

Radius ρ 1.7321
Azimuth θ
45.0000 °
Result, rounded to 4 decimal places
Polar angle φ
54.7356 °
Result, rounded to 4 decimal places
x
1
Input
You enter
x, y, z
You get
Radius ρ, Azimuth θ (°), Polar angle φ (°)
Rounding
4 dp

This calculator converts a point from Cartesian coordinates (x, y, z) to spherical coordinates. Enter x, y and z; you get the distance ρ from the origin, the azimuth θ measured in the xy-plane from the positive x-axis, and the polar angle φ measured down from the positive z-axis.

Formula

ρ = √(x² + y² + z²), θ = atan2(y, x) and φ = arccos(z ÷ ρ).

  • ρ: distance from the origin
  • θ: azimuth, −180° to 180°, in the xy-plane from the +x axis
  • φ: polar (zenith) angle, 0° to 180°, from the +z axis

This is the convention used in most maths textbooks for (ρ, θ, φ). Physics books often swap the letters θ and φ; the numbers are the same.

Worked Example

Take the point (1, 1, 1).

  1. ρ = √(1 + 1 + 1) = √3 = 1.7321
  2. θ = atan2(1, 1) = 45.0000°
  3. φ = arccos(1 ÷ 1.7321) = arccos 0.57735 = 54.7356°

How to read the result

Spherical coordinates suit problems with a centre: gravity and electric fields, antenna patterns, and points on a globe (where latitude = 90° − φ and longitude = θ). To go back: x = ρ sin φ cos θ, y = ρ sin φ sin θ, z = ρ cos φ.

Limits and common mistakes

  • At the origin φ is undefined; the calculator shows Cannot compute.
  • On the z-axis θ can be anything; the calculator shows 0°.
  • Check which letter your course uses for each angle before you copy the answer.

Frequently Asked Questions

What are the spherical coordinates of (0, 0, 2)?

ρ = 2, φ = 0° and θ undefined (shown as 0°).

How do I convert to latitude and longitude?

Latitude = 90° − φ and longitude = θ, on a sphere of radius ρ.

Why is θ negative?

Points with y below 0 have a negative azimuth. Add 360° for an angle between 0° and 360°.

Is this the same as cylindrical coordinates?

No. Cylindrical keeps z and uses r = √(x² + y²) in the plane.

Formula used
in x | x | - | 1 | -
in y | y | - | 1 | -
in z | z | - | 1 | -
out rho | Radius ρ | - | sqrt(x^2 + y^2 + z^2) | 4
out th | Azimuth θ | ° | atan2(y, x) * 180 / pi | 4
out ph | Polar angle φ | ° | acosd(z / rho) | 4

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Photo collage: a classroom globe with latitude and longitude lines, and a close-up of a brass armillary sphere.
Save this page: a 1000 × 1500 image of Convert to Spherical Coordinates Calculator.

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More on this panel

The whole Vectors and Coordinates panel →