Spherical Coordinates Calculator

By: Calculator Grid

Spherical Coordinates Calculator

Convert points between Cartesian coordinates (x, y, z) and spherical coordinates (r, θ, φ) with quadrant-aware angles and a validated Excel export.

Two-way conversion Angles in degrees Live results Validated XLSX

Startup example is ready to export.

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

Enter one point in a right-handed Cartesian system. θ is measured down from +z; φ is measured in the xy-plane from +x.

Required finite decimal; example: 3.

Required finite decimal; example: 4.

Required finite decimal; example: 12.

Radius r 13
Polar angle θ 22.619865°
Azimuth φ 53.130102°

r = √(x² + y² + z²), θ = arccos(z/r), φ = atan2(y, x)

Spherical (r, θ, φ) to Cartesian (x, y, z)

Use a nonnegative radius, a polar angle from 0° to 180°, and any finite azimuth in degrees.

Required, finite, and at least 0.

Required degrees from 0 to 180.

Required finite degrees; negatives allowed.

x coordinate 7.5
y coordinate 4.330127
z coordinate 5

x = r sin θ cos φ, y = r sin θ sin φ, z = r cos θ

Conversion details

The invariant check confirms that each converted point preserves its distance from the origin.

Direction Input tuple Output tuple Radius / norm check
Cartesian → spherical (3, 4, 12) (13, 22.619865°, 53.130102°) 13
Spherical → Cartesian (10, 60°, 30°) (7.5, 4.330127, 5) 10

Angles use degrees. Azimuth from Cartesian input is normalized to the interval [0°, 360°).

Cartesian input converts to r 13, theta 22.619865 degrees, phi 53.130102 degrees. Spherical input converts to x 7.5, y 4.330127, z 5.

How to use the spherical coordinates calculator

What this calculator does

This calculator converts a point between two standard descriptions of three-dimensional position. The first converter transforms Cartesian coordinates (x, y, z) into spherical coordinates (r, θ, φ). The second performs the reverse transformation. Radius r is the distance from the origin, polar angle θ is measured from the positive z-axis, and azimuth φ is measured counterclockwise in the xy-plane from the positive x-axis. The result is an exact coordinate-system identity subject only to displayed decimal rounding; it does not infer a physical location, map projection, or Earth-specific longitude and latitude.

When to use it

Use the calculator when checking vector components in physics or engineering, translating a 3D point for computer graphics, preparing a multivariable-calculus problem, or confirming coordinates in a model with spherical symmetry. The OpenStax explanation of cylindrical and spherical coordinates provides a useful geometric overview and shows why spherical variables simplify sphere-centered problems.

How to calculate

  1. The calculator opens with a complete demonstration: (x, y, z) = (3, 4, 12) and (r, θ, φ) = (10, 60°, 30°). Both result sets and the example XLSX are immediately available.
  2. For Cartesian-to-spherical conversion, replace the values in x coordinate, y coordinate, and z coordinate. Results update as soon as all three entries are valid.
  3. For spherical-to-Cartesian conversion, enter Radius r, Polar angle θ, and Azimuth φ. Angles are entered in degrees. Radius must be nonnegative, and θ must stay between 0° and 180°.
  4. Read the result cards and the Conversion details table. The table's radius / norm check should equal the source radius, apart from tiny floating-point differences hidden by display rounding.
  5. Select Download Excel to create a current-state workbook with Summary, Inputs, and Conversion Details sheets. Select Reset to clear the demonstration values, results, errors, table rows, and export cache. After Reset, Download Excel is disabled until at least one complete conversion is entered again.

Input guide

x coordinate, y coordinate, and z coordinate are required together for the Cartesian converter. Each accepts a finite plain decimal such as 3, -2.5, or 0. Scientific notation and decimal-comma notation are rejected so that pasted values cannot be silently reinterpreted. Increasing any component generally increases radius, but angle changes depend on direction and sign. A common mistake is to enter a comma-separated tuple in one field; enter one component per field.

Radius r is required for the spherical converter and must be a finite number greater than or equal to zero, such as 10. A larger radius scales x, y, and z proportionally without changing direction. Negative radius is rejected because this calculator uses the standard nonnegative-radius convention. Polar angle θ is required in degrees from 0 to 180; 0° points along +z, 90° lies in the xy-plane, and 180° points along -z. Azimuth φ is any finite degree value, such as 30 or -45; coterminal values such as 30° and 390° produce the same Cartesian point. Do not confuse θ and φ: notation varies across textbooks, so verify the convention before comparing results.

Output guide

Radius r is the nonnegative distance from the origin. It is driven by x, y, and z and equals zero only at the origin. Polar angle θ is an estimate displayed in degrees from 0° through 180°; it depends mainly on the ratio z/r. Azimuth φ is displayed in the normalized interval from 0° up to, but not including, 360°. The calculator uses the quadrant-aware atan2 operation, so points with negative x are assigned to the correct quadrant. At the origin, direction is undefined mathematically; this calculator reports θ = 0° and φ = 0° as an explicit coordinate convention.

The reverse outputs x coordinate, y coordinate, and z coordinate are signed Cartesian components. Zero can mean that the point lies on a coordinate plane or that radius is zero. Positive and negative values identify the side of the corresponding axis. The Conversion details columns show the direction, input tuple, output tuple, and radius / norm check. They are comparison and verification outputs, not additional assumptions.

Worked example

For the startup Cartesian point (3, 4, 12), r = √(3² + 4² + 12²) = √169 = 13. The polar angle is arccos(12/13) = 22.619865°, and the quadrant-aware azimuth is atan2(4, 3) = 53.130102°. For the startup spherical point (10, 60°, 30°), x = 10 sin 60° cos 30° = 7.5, y = 10 sin 60° sin 30° = 4.330127, and z = 10 cos 60° = 5. These values match the first-open result cards, detail table, and workbook checkpoints.

How the conversion formulas work

The Cartesian radius follows the three-dimensional Pythagorean theorem. The polar angle is recovered from the z component because z/r is the cosine of the angle from the positive z-axis. Azimuth comes from the point's xy projection. Using atan2(y, x), rather than a simple arctangent of y/x, preserves quadrant information and handles x = 0 safely. The Wolfram MathWorld spherical coordinates reference discusses the coordinate system and common notation choices.

In the reverse direction, r is projected first onto the xy-plane by sin θ. The projection is then split into x and y by cos φ and sin φ, while cos θ gives the z fraction. This structure also explains the invariant check: √(x² + y² + z²) returns the original nonnegative radius. LibreTexts describes why spherical coordinates are especially useful for spherically symmetric geometry.

Angle conventions and common mistakes

Different disciplines sometimes swap the symbols θ and φ. This calculator follows the convention used in its interface: θ is the polar angle from +z, and φ is azimuth from +x in the xy-plane. Always compare definitions, not symbols alone. Math Insight's visual explanation of spherical coordinates is helpful for seeing how radius, polar angle, azimuth, and the xy projection relate.

Another common mistake is assuming that one spherical tuple is unique. Azimuth may be shifted by any multiple of 360° without changing the point, and azimuth is irrelevant at either pole. This calculator accepts any finite azimuth for spherical input and normalizes Cartesian-derived azimuth to ][0°, 360°). Results are displayed to at most six decimal places, while the workbook stores the underlying numeric values at full JavaScript floating-point precision.

]