Spherical to Cartesian Converter

The x, y and z position of a point given by radius, polar angle and azimuth.

How it is calculated

The tool uses the physics convention: r is the distance from the origin, θ (theta) is the polar angle measured from the positive z-axis, and φ (phi) is the azimuth measured in the xy-plane from the positive x-axis. Both angles are entered in degrees and converted to radians internally. Then x = r sin θ cos φ, y = r sin θ sin φ and z = r cos θ. Results are rounded to two decimals. A negative r is accepted and simply points the opposite way, giving the negated coordinates. Angles outside 0–180° for θ or 0–360° for φ are not rejected; the trigonometric functions wrap around, though θ beyond 180° describes the same point in a less usual way.

Worked example

Take r = 10, θ = 60° and φ = 45°. The sines and cosines are sin 60° ≈ 0.8660, cos 60° = 0.5, sin 45° = cos 45° ≈ 0.7071. Then x = 10 × 0.8660 × 0.7071 ≈ 6.12, y = 10 × 0.8660 × 0.7071 ≈ 6.12, and z = 10 × 0.5 = 5.00. The point is (6.12, 6.12, 5.00). Its distance from the origin is √(6.12² + 6.12² + 5²) = 10, confirming the conversion.

Try this example →

Common mistakes

  • Entering the angles in radians. The fields take degrees, so 1.0472 would be read as about 1 degree, not 60.
  • Swapping θ and φ. Here θ is the inclination from the z-axis and φ is the rotation in the xy-plane, but some textbooks and software use the opposite naming.
  • Treating θ as latitude. Latitude is measured from the equator, while θ is measured from the pole (z-axis), so latitude 30° corresponds to θ = 60°.
  • Expecting an exact 0 for results like cos 90°. The values are rounded to two decimals, so tiny floating-point leftovers display as 0.00.

About this calculator

Spherical coordinates locate a point using a radius r (distance from the origin), a polar angle θ (inclination from the positive z-axis), and an azimuthal angle φ (rotation in the xy-plane from the x-axis). Converting to Cartesian coordinates uses x = r·sinθ·cosφ, y = r·sinθ·sinφ, and z = r·cosθ.

This conversion shows up constantly in physics (orbital mechanics, electromagnetic field problems, and the angular wavefunctions of quantum mechanics), in 3D graphics and game development when translating orbit-camera or joystick input into a scene's x/y/z position, and in astronomy and robotics whenever a direction and distance need to become a point in space.

Was this helpful?

You can pick up to 3 reactions.

Comments

  • Be the first to comment.

Popular calculators

All Calculators