Spherical Coordinate Converter

Stephanie Ben-Joseph headshot Stephanie Ben-Joseph

What this spherical coordinate converter does

This calculator converts points between Cartesian coordinates (x, y, z) and spherical coordinates (r, θ, φ) in three dimensions. It uses the common physics and engineering convention where:

The tool is designed for students, engineers, and scientists who need quick, reliable conversions and a clear reminder of the underlying formulas and assumptions. All angles are handled in radians.

Cartesian vs. spherical coordinates

A point in three-dimensional space can be written in several coordinate systems. In Cartesian coordinates, a point is specified by its signed distances along three perpendicular axes: (x, y, z).

In spherical coordinates, the same point is described using a distance from the origin and two angles:

This convention is standard in many physics and engineering applications, especially where there is rotational or spherical symmetry (for example, around a point charge, a planet, or a spherical antenna pattern).

Conversion formulas

The converter uses the following standard relationships between Cartesian and spherical coordinates.

From Cartesian (x, y, z) to spherical (r, θ, φ)

Given a point (x, y, z):

In MathML form, the radial distance is:

r = x2 + y2 + z2

From spherical (r, θ, φ) to Cartesian (x, y, z)

Given spherical coordinates (r, θ, φ) with r ≥ 0:

Typical angle ranges and conventions

There are several possible spherical coordinate conventions. This converter follows the widely used physics convention:

If you supply angles outside these ranges, the point is still valid because the trigonometric functions are periodic. For example, φ = 3π and φ = π represent the same azimuthal direction.

All inputs and outputs for angles in this tool are in radians. To convert degrees to radians, multiply by π / 180. To convert radians to degrees, multiply by 180 / π.

How to use the converter

Convert from Cartesian to spherical

  1. Enter your x, y, and z values in the Cartesian input fields.
  2. Leave the spherical fields blank or ignore existing values.
  3. Choose the option to convert to spherical coordinates.
  4. Read the computed r, θ, and φ values (in radians).

Convert from spherical to Cartesian

  1. Enter your r, θ, and φ values in the spherical input fields. Use radians for angles.
  2. Leave the Cartesian fields blank or ignore existing values.
  3. Choose the option to convert to Cartesian coordinates.
  4. Read the computed x, y, and z values.

Worked examples

Example 1: Cartesian to spherical

Consider the point (x, y, z) = (1, 1, √2).

  1. Compute the radius: r = √(1² + 1² + (√2)²) = √(1 + 1 + 2) = √4 = 2.
  2. Compute the polar angle: θ = arccos(z / r) = arccos(√2 / 2). Since cos(π/4) = √2 / 2, we get θ = π / 4.
  3. Compute the azimuthal angle with atan2: φ = atan2(1, 1) = π / 4, because both x and y are positive and equal.

Thus, the spherical coordinates are (r, θ, φ) = (2, π/4, π/4).

Example 2: Spherical to Cartesian

Now start with spherical coordinates (r, θ, φ) = (2, π/3, π/4).

  1. Use x = r · sin(θ) · cos(φ): x = 2 · sin(π/3) · cos(π/4) = 2 · (√3/2) · (√2/2) = (2 · √3 · √2) / 4 = √6 / 2.
  2. Use y = r · sin(θ) · sin(φ): y = 2 · sin(π/3) · sin(π/4) = 2 · (√3/2) · (√2/2) = √6 / 2.
  3. Use z = r · cos(θ): z = 2 · cos(π/3) = 2 · (1/2) = 1.

The corresponding Cartesian point is (x, y, z) = (√6/2, √6/2, 1).

Interpreting your results

Note that multiple spherical representations can describe the same Cartesian point because adding integer multiples of to φ or reflecting θ in specific ways can produce equivalent directions. The converter reports one consistent choice based on standard inverse trigonometric functions.

Comparison: Cartesian and spherical coordinates

Aspect Cartesian coordinates (x, y, z) Spherical coordinates (r, θ, φ)
Components Three orthogonal distances along axes. One distance from origin and two angles.
Typical use General geometry, linear algebra, graphics. Radially symmetric fields, waves, and geometry involving spheres.
Volume element dx · dy · dz r² sin(θ) · dr · dθ · dφ
Surface of a sphere Implicit equation x² + y² + z² = r². Simply r = constant.
Advantages Straightforward for linear motion and rectangular domains. Natural for spheres, shells, and radially symmetric problems.
Disadvantages Can be awkward for spherical symmetry; integrals may be harder. Angles can be less intuitive; multiple conventions exist.

Who this tool is for

Assumptions and limitations

Frequently asked questions

Are the angles in radians or degrees?

All angles in this spherical coordinate converter are in radians. If your values are in degrees, convert them first using radians = degrees × π / 180.

Which convention for θ and φ does this tool use?

The tool uses the common physics convention: θ is the polar angle measured from the positive z-axis (0 to π), and φ is the azimuthal angle in the xy-plane measured from the positive x-axis.

Can I enter negative angles?

Yes. Negative angles are allowed and are interpreted using periodic trigonometric functions. For example, φ = −π/4 is equivalent to φ = 7π/4.

What happens at the origin (r = 0)?

At the origin, the point is located exactly at (0, 0, 0). The angles θ and φ do not affect the position and are mathematically undefined. Any angle values represent the same point.

How accurate are the results?

The results are computed using standard floating‑point arithmetic. For typical educational and engineering uses, the accuracy is more than sufficient. Very extreme values may show minor rounding differences.

Cartesian Input

Spherical Input

Enter values and choose a direction.

Embed this calculator

Copy and paste the HTML below to add the Spherical Coordinate Converter - Cartesian and Spherical Forms to your website.