Convert Spherical to Cartesian Coordinates - Calculator
Convert spherical coordinates (r, θ, φ) to Cartesian coordinates (x, y, z) using our spherical to cartesian calculator with step-by-step solutions and a graph, using θ as the polar angle and φ as the azimuthal angle.
Cartesian coordinates
Cartesian graph
3D coordinatesx · y · z components · projections
Scale follows the radius
y = r sinθ sinφ
z = r cosθ
Step-by-step solution
A point in spherical coordinates is described by three quantities: the radius, the azimuth, and the polar angle. The radius gives its distance from the origin, while the two angles specify its direction. This calculator converts those inputs into Cartesian coordinates, giving the same location through x, y, and z.
Start with the radius and two angles. Before entering them, check the angle convention: here, theta describes the polar angle, while phi measures the azimuthal angle from the positive x-axis. Swapping these labels can produce a different answer, even when the arithmetic is correct.
Use the calculated x, y, and z components to place the point on a grid. Choose matching degrees or radians so the inputs describe the intended direction.
How to Use Spherical to Cartesian Calculator? (Step by Step)
Check the angle definitions before entering spherical coordinates. Different sources use different symbols, so matching each field prevents an answer from describing the wrong point.
- Enter the radial distance, labeled r or ρ. This measures how far the location lies from the origin.
- Select the angle unit that matches your inputs. Mixing degrees and radians changes the answer.
- Identify the azimuth angle, measured around the z-axis from the +x axis. Enter it in the matching field.
- Find the polar angle, measured down from the positive z-axis. Avoid substituting an elevation angle, which starts at the horizontal plane.
- Press the button Convert Spherical to Cartesian or press Enter on the keyboard to convert your spherical coordinates into rectangular coordinates.
- Check the displayed result against your inputs before copying it.
How to Convert Spherical to Cartesian Coordinates (Step by Step)
Spherical coordinates describe a point using a distance and two angles. Here, r is the radial coordinate, θ is measured from the +z axis, and φ is measured counterclockwise from the positive x-axis in the x-y plane.
- Find the horizontal projection using r sinθ. This is the point’s distance from the vertical axis.
- Find the x-coordinate using x = r sinθ cosφ.
- Find the y-coordinate using y = r sinθ sinφ.
- Find the height using z = r cosθ. A positive z places the point above the horizontal plane; a negative z places it below.
- Write the result as (x, y, z).
Use consistent angle units throughout the calculation. Keep full precision during intermediate steps, then round the final values to the required accuracy.
Derivations of Spherical to Cartesian Conversion Formulas
The horizontal distance s (OQ) from the vertical axis is the key to this derivation. Once that distance is known, sine and cosine split it into the x and y components.

In the spherical coordinate system, let r measure the distance from the origin O to point P. Here, φ is the azimuthal angle, measured counter-clockwise from the positive x-axis when viewed from above the positive z-axis; θ is the inclination, measured down from that positive vertical axis.
Draw a perpendicular from P to the xy-plane, and call its foot Q. This orthogonal projection creates a right triangle with sloping side r, vertical component z, and horizontal length s.
The trigonometric ratios connect these lengths to θ. The vertical component lies beside θ, while the horizontal length lies opposite it:
cos θ = z/r ⇒ z = r cos θ
sin θ = s/r ⇒ s = r sin θ
Now view the horizontal triangle from above. Its sloping side is s, and φ determines how that length splits along the horizontal axes:
x = s cos φ, y = s sin φ
Replacing s with r sinθ gives the three formulas:
x = r sinθ cosφ
y = r sinθ sinφ
z = r cosθ
Physics (ISO) vs. Math Convention
The main difference is what theta (θ) and phi (φ) mean. Before using a calculator, check which angle starts at the positive z-axis and which turns around it.
| Angle or formula | Physics (ISO) convention | Common math convention |
|---|---|---|
| Polar angle: inclination or zenith angle, measured from the positive z-axis | θ | φ |
| Azimuth: measured from the positive x-axis toward the positive y-axis in the xy-plane | φ | θ |
| x-coordinate formula | x = r sinθ cosφ | x = ρ sinφ cosθ |
| y-coordinate formula | y = r sinθ sinφ | y = ρ sinφ sinθ |
| z-coordinate formula | z = r cosθ | z = ρ cosφ |
Both conventions describe the same position of a point. When switching between them, swap the two angle values and keep the radius the same. Always check the diagram, because books and tools may use different angle labels.
Spherical to Cartesian Conversion Examples
A useful check comes before the arithmetic: the distance from the origin must stay unchanged after conversion. Changing coordinate labels changes how a point is described, but it does not move the point.
Take r = 5, θ = 60°, and φ = 30°. Here, θ is measured from the positive z-axis, while φ is measured in the horizontal plane from the positive x-axis.
The worked substitution gives x = 5 × sin60° × cos30° = 3.75, y = 5 × sin60° × sin30° ≈ 2.1651, and z = 5 × cos60° = 2.5. Squaring these results and adding them gives approximately 25, matching the squared radius.
For another example, use (r, θ, φ) = (3, 5π/12, 0), with angles in radians. Substitution gives x = 3 sin(5π/12) ≈ 2.8978, y = 0, and z = 3 cos(5π/12) ≈ 0.7765. Because the azimuth is zero, the point lies in the vertical x–z plane, with no displacement along the y-axis.
Common Mistakes in Spherical to Rectangular Conversion
Small input mistakes can place a point in the wrong location, even when the calculations seem correct. Check these common errors before accepting your answer.
- A point can have the correct distance from the center and still face the wrong way. Check angle conventions and coordinate order before trusting the result.
- Match degrees mode to your inputs; a calculator cannot read your intent. Entering degree values as radians changes the direction even when the arithmetic is correct.
- Round only at the end. Reducing decimal places too early can change small coordinate values noticeably.
Spherical to Cartesian Conversion FAQs
1) Why do physics texts and mathematics books use different angle notation?
Physics and mathematics books often assign θ and φ differently in spherical coordinates because each field follows its own conventions. Physics commonly uses θ for the polar angle and φ for the azimuthal angle, while many mathematics books reverse them. Always check how each angle is defined.
Where is Spherical to Cartesian Conversion Used?
Spherical to Cartesian conversion is used in physics, astronomy, engineering, and computer graphics to express positions as x, y, and z coordinates.
It helps locate celestial objects, process radar measurements, model electromagnetic fields, and render three-dimensional scenes. Converting radial distances and angles into Cartesian coordinates also simplifies calculations involving motion, distances, and spatial relationships.
Can a Cartesian point have more than one spherical representation?
Yes, a Cartesian point can have multiple spherical representations. Adding any multiple of 360° to the azimuth angle gives the same point. At the poles, azimuth is arbitrary; at the origin, both angles are arbitrary.
When does a converted point lie on the +y axis?
A converted point lies on the +y axis when x = 0, z = 0, and y > 0. In spherical coordinates, this means a positive radius, azimuth of 90°, and polar angle of 90° measured from +z.
How to convert a point (3, 5pi/12, 0) spherical to rectangular?
Using (r,θ,φ), where θ is the polar angle and φ is the azimuthal angle:
x = r sin θ cos φ
y = r sin θ sin φ
z = r cos θ
For (3, 5pi/12, 0):
x = 3 sin(5π/12) cos 0 = 3(√6 + √2)/4
y = 3 sin(5π/12) sin 0 = 0
z = 3 cos(5π/12) = 3(√6 − √2)/4
The rectangular coordinates are: (x,y,z) ≈ (2.8978,0, 0.7765).
If you consider the mathematical convention (r, θ, φ), where θ is azimuthal and φ is polar, your answer for (3,5pi/2,0) will be (0,0,3).
