How it’s calculated
Polar coordinates describe a point in the plane by its distance r from the origin and its angle θ from the positive x-axis. Cylindrical coordinates add the height z. Spherical coordinates use the distance ρ from the origin, the same angle θ around the z-axis, and the angle φ down from the positive z-axis.
Why atan2? arctan(y ÷ x) cannot tell (−1, 1) from (1, −1), because both ratios are −1. atan2 looks at the signs of x and y and picks the right quadrant. Here θ is reported between 0° and 360°.
Example: r = 2 and θ = 60° give x = 2 cos 60° = 1 and y = 2 sin 60° = 1.7320508. In the other direction (−1, 1) has r = √2 ≈ 1.4142136 and θ = 135°, in the second quadrant. In 3D, (1, 1, √2) has ρ = 2, θ = 45° and φ = 45°.
This follows the mathematics convention (φ measured from the z-axis, as in OpenStax Calculus). Physics and engineering texts sometimes swap the roles of θ and φ, so check your textbook's convention.
Frequently asked questions
How do I convert Cartesian to polar coordinates?
r = √(x² + y²) and θ = atan2(y, x). Using atan2 rather than arctan(y/x) puts the angle in the correct quadrant.
Can the radius be negative?
Some textbooks allow it (the point is then on the opposite side of the origin). This converter keeps r at 0 or more; add 180° to θ to get the same point.
Which angle is φ in spherical coordinates?
Here φ is the angle down from the positive z-axis (0° at the north pole, 180° at the south pole) and θ is the angle around the z-axis, as in OpenStax Calculus Volume 3. Physics books often swap the two symbols.
What is the angle at the origin?
It is undefined, because every direction points away from the origin at distance 0. The calculator shows 0 and says so.
Embed this calculator
Add this free calculator to your own website. Copy the code below into your page’s HTML:
Need this calculator branded, changed or built around your own prices?See custom business solutions →
Sources
- Precalculus 2e, §8.3 Polar Coordinates — OpenStax
- Calculus Volume 3, §2.7 Cylindrical and Spherical Coordinates — OpenStax
Formulas are taken from the free public references above. Results are provided “as is” for informational and educational purposes only. See our disclaimer.
Added · Last updated · How we check our calculators
Spotted a mistake or missing option? Report a problem· Suggest a calculator