What this converter does
This tool converts a point described in 3D spherical coordinates into standard Cartesian coordinates (x, y, z). You supply the radial distance r, the azimuthal angle theta (measured in the x-y plane), and the polar angle phi (measured down from the positive z axis), and it returns the equivalent rectangular position.
Angle convention used
Conventions for naming the two angles differ between textbooks. This calculator uses the mapping where theta is the azimuth (rotation in the x-y plane) and phi is the polar angle (tilt from the +z axis). If your source swaps these names, simply swap the values you enter so the math lines up.
How to use it
Enter r, theta and phi, then pick whether your angles are in Degrees (default) or Radians. The converter scales the angles to radians internally (multiply by \(\frac{\pi}{180}\) for degrees) before applying the trig functions, then displays x, y and z to about ten significant digits.
The formula explained
The point lies on a sphere of radius \(r\). The polar angle \(\phi\) sets how far the point tilts from the vertical axis: \(z = r\cdot\cos\phi\). The horizontal projection has length \(r\cdot\sin\phi\), and the azimuth \(\theta\) splits that projection between the x and y axes, giving
$$x = r\,\sin\phi\,\cos\theta \quad\text{and}\quad y = r\,\sin\phi\,\sin\theta$$
Worked example
Take r = 5, theta = 60 degrees, phi = 30 degrees. Then \(\sin\phi = 0.5\), \(\cos\phi = 0.8660254\), \(\cos\theta = 0.5\), \(\sin\theta = 0.8660254\). So
$$x = 5 \times 0.5 \times 0.5 = 1.25$$$$y = 5 \times 0.5 \times 0.8660254 = 2.16506351$$$$z = 5 \times 0.8660254 = 4.33012702$$The Cartesian point is (1.25, 2.16506351, 4.33012702).
Common Angle Reference Values and Resulting Points
This calculator uses theta (θ) as the azimuth, measured in the x-y plane from the +x axis, and phi (φ) as the polar angle, measured down from the +z axis. The formulas are \(x = r\sin\phi\cos\theta\), \(y = r\sin\phi\sin\theta\) and \(z = r\cos\phi\). The table below uses r = 1.
| θ (azimuth) | φ (polar) | (x, y, z) | Location |
|---|---|---|---|
| any (e.g. 0°) | 0° | (0, 0, 1) | +z axis (north pole) |
| 0° | 90° | (1, 0, 0) | +x axis |
| 90° | 90° | (0, 1, 0) | +y axis |
| 180° | 90° | (-1, 0, 0) | -x axis |
| 270° | 90° | (0, -1, 0) | -y axis |
| any (e.g. 0°) | 180° | (0, 0, -1) | -z axis (south pole) |
When φ is 0° or 180°, the point lies on the z axis, so θ has no effect on the result.
Sine and cosine of 30°, 45° and 60°
| Angle | sin | cos |
|---|---|---|
| 30° | 1/2 = 0.5 | √3/2 ≈ 0.8660 |
| 45° | √2/2 ≈ 0.7071 | √2/2 ≈ 0.7071 |
| 60° | √3/2 ≈ 0.8660 | 1/2 = 0.5 |
Scaling with r: x, y and z are all proportional to r. Doubling r doubles every coordinate, so the table above gives the point for any radius if you multiply each entry by r. For example, with r = 3 and φ = 90°, θ = 0° gives (3, 0, 0).
Degrees and Radians Conversion Table
Conversion rules:
- radians = degrees × π/180
- degrees = radians × 180/π
Use this table when you set the calculator to radians. A full turn is 360° = 2π rad, and 1 rad ≈ 57.2958°.
| Degrees | Radians (exact) | Radians (decimal) |
|---|---|---|
| 0° | 0 | 0.0000 |
| 30° | π/6 | 0.5236 |
| 45° | π/4 | 0.7854 |
| 60° | π/3 | 1.0472 |
| 90° | π/2 | 1.5708 |
| 120° | 2π/3 | 2.0944 |
| 135° | 3π/4 | 2.3562 |
| 150° | 5π/6 | 2.6180 |
| 180° | π | 3.1416 |
| 270° | 3π/2 | 4.7124 |
| 360° | 2π | 6.2832 |
Example: \(60^\circ \times \frac{\pi}{180} = \frac{\pi}{3} \approx 1.0472\) rad.
Comparing Different Angle Conventions (Physics vs. Math)
Textbooks disagree on which Greek letter is which angle. If you enter the right numbers in the wrong fields, you get a different point. The table compares r = 5 with the angles 60° and 30°, entered both ways in this calculator (θ = azimuth, φ = polar).
| Entry | r | θ (azimuth) | φ (polar) | x | y | z |
|---|---|---|---|---|---|---|
| A: θ = 60°, φ = 30° | 5 | 60° | 30° | 1.25 | 2.1651 | 4.3301 |
| B: values swapped, θ = 30°, φ = 60° | 5 | 30° | 60° | 3.75 | 2.1651 | 2.5 |
Worked substitution for A: \(x = 5\sin 30^\circ\cos 60^\circ = 5(0.5)(0.5) = 1.25\), \(y = 5\sin 30^\circ\sin 60^\circ = 5(0.5)(0.8660) \approx 2.1651\), \(z = 5\cos 30^\circ \approx 4.3301\).
Worked substitution for B: \(x = 5\sin 60^\circ\cos 30^\circ = 5(0.75) = 3.75\), \(y = 5\sin 60^\circ\sin 30^\circ = 5(0.8660)(0.5) \approx 2.1651\), \(z = 5\cos 60^\circ = 2.5\).
Check: both points are 5 from the origin, since \(1.25^2 + 2.1651^2 + 4.3301^2 = 25\) and \(3.75^2 + 2.1651^2 + 2.5^2 = 25\). Only the direction differs.
Conventions to watch for
- This tool: θ = azimuth (in the x-y plane), φ = polar angle from +z.
- ISO 80000-2 / most physics texts: θ = polar angle from +z, φ = azimuth. A point given as (r = 5, θ = 30°, φ = 60°) in that convention corresponds to entry A here (azimuth 60°, polar 30°). Swap the two angle values before entering them.
- Many math texts use the same convention as this tool, but some use the physics one, so always check the definition in your source.
- Geographic latitude: latitude is measured up from the equator rather than down from the pole, so the polar angle is φ = 90° - latitude. This gives \(z = r\sin(\text{latitude})\) and \(x = r\cos(\text{latitude})\cos(\text{longitude})\), with longitude playing the role of θ.
FAQ
What if r = 0? The point is at the origin (0, 0, 0) regardless of the angles.
Can angles be negative or larger than 360? Yes. Trigonometric functions are periodic, so any real angle is valid and handled correctly.
What does phi = 0 mean? The point sits on the positive z axis: \(x = y = 0\) and \(z = r\). A phi of 180 degrees puts it on the negative z axis (\(z = -r\)).