Math calculator

Polar Coordinates Calculator

Both directions, with the quadrant kept.

Convert between the two

Add a z for cylindrical and spherical.

(3, 4)

r = 5, θ = 53.130102°

The point lies in the first quadrant, and the angle is measured anticlockwise from the positive x-axis.

Radius r

5

distance from the origin

Angle θ

53.130102°

anticlockwise from +x

θ in radians

0.92729522

the same angle, other unit

Position

the first quadrant

which is what atan would lose

  • The angle is measured anticlockwise from the positive x-axis, and reported in 0° to 360° rather than −180° to 180° — both conventions are in use, so the page states which one it means.
  • The radius is a distance, so it is never negative here. Some texts allow a negative radius with the angle reflected; that describes the same point a second way, and this page does not use it.

The angle comes from atan2, which is given x and y separately and so keeps the quadrant.

What this tool shows

A point needs a distance and a direction, and getting the direction right is where this goes wrong. atan(y/x) cannot tell (−3, −4) from (3, 4) — same ratio — so it answers 180° out. atan2 is given both components and keeps the quadrant.

  • Cartesian to polar, in any quadrant
  • Polar back to cartesian
  • Cylindrical and spherical coordinates
  • Why atan2 exists as a separate function
  • The two different radii in three dimensions
  • What happens at the origin
Both directions The atan trap Quadrant kept 2D and 3D

Add a z value for cylindrical and spherical.

Updated 7 September 2026 · Works in any browser, no installation

The radius is Pythagoras; the angle needs atan2. For (3, 4): radius 5, angle 53.13°. For (−3, −4): radius 5 again, but the angle is 233.13° — not 53.13°. Those two points share the ratio y/x, which is why a page built on atan reports them as the same direction.

At a glance

Formula shown
r = √(x² + y²) and θ = atan2(y, x). Back the other way, x = r cos θ and y = r sin θ. In three dimensions the spherical radius is √(x² + y² + z²) while the cylindrical one stays √(x² + y²).
Scenario support
Describing a bearing and a distance; working with a rotationally symmetric problem; converting a complex number to modulus-argument form.
Educational estimate
Planning support from the values you enter — not professional advice.

Distance and direction

Cartesian coordinates say how far across and how far up. Polar coordinates say how far away and in which direction. Same point, two descriptions.

The radius is a distance from the origin, so it comes straight from Pythagoras and is never negative here. Some texts do allow a negative radius, read as walking backwards along the ray; that describes the same point a second way, and this page does not use it.

Polar is the natural description whenever a problem has rotational symmetry. A circle is r = constant — one equation, one variable — where in cartesian coordinates it is x² + y² = r² and needs both.

Why atan2 exists

The naive formula is θ = arctan(y/x), and it is wrong in half the plane.

The problem is the division. (3, 4) and (−3, −4) both give y/x = 4/3, so arctan returns the same angle for two points on opposite sides of the origin. It has been handed a ratio, and a ratio cannot carry the signs of its parts.

It also fails on the vertical axis. x = 0 makes the division undefined, so (0, 5) — straight up, angle 90°, nothing exotic about it — has to be special-cased.

atan2 takes y and x as two separate arguments precisely so it can look at both signs. That is its entire reason for existing, and it is why every language ships it alongside atan rather than expecting people to build it. Using atan here is one of the most common bugs in graphics and robotics code.

Three dimensions, two radii

Adding a z value gives two extensions, and the difference between them is a radius that means two different things.

Cylindrical keeps the polar pair and adds the height unchanged. Its radius measures out from the z-axis, so it is still √(x² + y²).

Spherical measures out from the origin, so its radius is √(x² + y² + z²), and needs a second angle to say how far down from the z-axis the point sits.

For (1, 2, 2) the cylindrical radius is √5 ≈ 2.24 and the spherical radius is exactly 3. Both are called r in most textbooks, which is why this page names them separately.

Which to use follows the symmetry of the problem: a pipe or a rotating shaft is cylindrical, a planet or a point source is spherical.

The conventions that clash

More of the difficulty here is notation than mathematics, so it is worth being explicit.

Angle range. This page reports 0° to 360°. Most programming languages return −180° to 180° from atan2. The same direction, two names — 233° and −127° are the same way round.

θ and φ. In spherical coordinates, mathematics texts usually make θ the angle around the z-axis and φ the one down from it. Physics texts swap them. ISO 80000-2 sides with the physicists. This page uses the mathematical convention and says so wherever it matters, because a formula copied from the other tradition will be silently wrong.

Degrees or radians. Every trigonometric function in every standard library takes radians. Converting at the boundary and staying in radians inside is the habit that avoids the problem.

Where it gets used

Navigation. A bearing and a distance is a polar coordinate. Converting to cartesian is what lets you add two legs of a journey together.

Graphics and games. Anything that orbits, rotates or radiates is easier in polar. Working out which way an object should face is an atan2 call, and getting it wrong is why something occasionally aims exactly backwards.

Complex numbers. Modulus and argument are a radius and an angle. Multiplication becomes “multiply the radii, add the angles”, which is far easier than the cartesian version.

Signal processing and physics. Amplitude and phase, field strength and direction — both are polar pairs, and the conversion sits at every boundary between the two views.

Sources and methodology

The conversions and the conventions are standard; these are the references.

Method. The angle is computed with atan2 rather than atan, which is not a stylistic choice: atan is given only the ratio y/x and so cannot distinguish a point from its reflection through the origin, and it divides by zero on the vertical axis. The origin is reported as having no defined angle rather than being given zero, because every angle there names the same point. Round-tripping cartesian to polar and back is checked as a property test over three thousand generated points, which catches a quadrant error anywhere rather than only at the four cases a person would pick. That engine is verified on every change against 119 hand-written assertions, including that converting to polar and back recovers the original point across three thousand generated values spanning all four quadrants and both axes. The count and the per-case breakdown are published on the formula verification page.

Related calculators

Where this goes next:

DistanceThe distance between two points in the plane or in space, kept exact as a surd wherever the square root does not come out — √50 stays √50, and is also shown as 5√2.
Angle Between Two VectorsDot product, magnitudes and the angle as separate steps, in the plane or in space — with exactly parallel vectors returning 0° rather than a floating-point smudge.
Trigonometric FunctionsAll six functions at once with exact surd values at the sixteen special angles — and tan 90° reported as undefined rather than as the 1.6 × 10¹⁶ a double returns.
Unit CircleWhere an angle lands, with exact surd coordinates and the radian measure as a multiple of π — because the coordinates ARE the cosine and sine.
Complex NumberAdd, subtract, multiply, divide and raise complex numbers to powers exactly — (1+i)^8 is 16, not 15.999999999999996 — with the conjugate trick shown as the working for division.
VectorMagnitude, unit vector, sum, both products and the projection — with parallelism decided on the cross product, so exactly parallel vectors return exactly 0° and not a millionth of a degree.

More in Math, or browse all calculators.

Read the guide

A complex number in modulus-argument form is a polar coordinate wearing a different name — the Complex Number Calculator works in that notation.

Educational use disclaimer

This is an educational tool. Angles involve inverse trigonometric functions and are decimal; the page states which convention it uses.

How we calculate · Found an error? email us

Authorship & verification

Written and maintained by , a business operator who builds spreadsheet-based calculators.

What's changed (3 updates)

Published 7 September 2026

  1. Published the polar coordinates page taking the angle from atan2 rather than atan(y/x), since atan is handed only the ratio and cannot tell (−3,−4) from (3,4) — two points on opposite sides of the origin.
  2. Names the two different radii in three dimensions: the cylindrical one measures out from the z-axis and the spherical one from the origin, and both are called r in most textbooks.
  3. States its own conventions — 0° to 360° rather than −180° to 180°, and the mathematical rather than the physics reading of θ and φ — because a formula copied from the other tradition is silently wrong.

Add this calculator to your site

Responsive embed — and private: nothing your visitors type leaves their browser.