Convert between Cartesian (x,y,z) and Spherical (r, θ, φ) coordinates
Select your conversion type, input the coordinates, and get instant, accurate results. This tool is essential for applications in physics, engineering, and mathematics.
Click on an example to load it into the calculator.
Convert a standard Cartesian point to its spherical equivalent.
x: 3
y: 4
z: 5
Convert a point lying directly on the Z-axis.
x: 0
y: 0
z: 10
Convert a standard spherical point to its Cartesian equivalent.
r: 10
θ: 60°
φ: 45°
Convert a spherical point where the polar angle is 90 degrees.
r: 5
θ: 90°
φ: 30°
x
, y
, and z
input fields.r
(radius), θ
(polar angle), and φ
(azimuthal angle) fields, ensuring the angles match your selected unit.r = √(x² + y² + z²)
θ = arccos(z / r)
φ = arctan(y / x)
. Care must be taken to place the angle in the correct quadrant, often using an atan2(y, x)
function.x = r * sin(θ) * cos(φ)
y = r * sin(θ) * sin(φ)
z = r * cos(θ)
r
is 0. In this case, both the polar angle θ
and the azimuthal angle φ
are undefined because there is no unique vector direction from the origin to itself.φ
is undefined. This is because the projection of the point onto the XY-plane is the origin, and there is no clear angle from the X-axis. By convention, it is often set to 0.θ
is the inclination from the Z-axis and φ
is the azimuth from the X-axis. In physics, the roles of θ and φ are often swapped, where θ
becomes the azimuth and φ
the inclination. Always check the convention being used in your context.