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) = √3 = 1.7321
- θ = atan2(1, 1) = 45.0000°
- φ = 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

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.
- Coordinate Rotation Calculator (2D)2.0981
- Angle Between Two Planes Calculator63.6122 °
- Vector Cross Product Calculator (3D)-3.000
- 3D Unit Vector Calculator0.2857