Cartesian to Polar Coordinates Converter

Cartesian to Polar Coordinates Converter

Emerging AI Skill PRO

Enter Calculation

Formula

r=X2+Y2θ=atan2(Y,X)×180π\begin{gathered} r = \sqrt{\text{X}^{2} + \text{Y}^{2}} \\[1em] \theta = \operatorname{atan2}\!\left(\text{Y},\ \text{X}\right) \times \frac{180}{\pi} \end{gathered}
Usage stats

Advertisement

Results

Polar Coordinates (r, θ)
r = 5
θ = 126.869898 degrees
Radius r 5
Angle θ 126.869898 deg
Angle (radians) 2.214297 rad
Method r = sqrt(x²+y²), θ = atan2(y, x)

Report an error on this page

What this converter does

This tool converts a point given in 2D Cartesian (rectangular) coordinates (x, y) into polar coordinates (r, theta). The radius r is the straight-line distance from the origin to the point, and the angle theta is measured counterclockwise from the positive x-axis. You can choose to read theta in degrees or radians.

How to use it

Enter the X coordinate and Y coordinate, pick whether you want the output angle in degrees or radians, and the calculator returns r and theta instantly. The coordinates are unitless plane values, so r is expressed in the same length units you used for x and y.

Four-quadrant diagram illustrating how atan2 assigns the correct angle in each quadrant
atan2 picks the correct angle based on the signs of x and y across all four quadrants.

The formula explained

The radius comes from the Pythagorean theorem: $$r = \sqrt{x^{2} + y^{2}}$$ The angle is computed with the two-argument arctangent, $$\theta = \operatorname{atan2}(y,\ x)$$ Although many textbooks write \(\theta = \arctan(y/x)\), plain arctan only returns angles between -90 and 90 degrees and is undefined when \(x = 0\). The atan2 function fixes both problems: it inspects the signs of \(x\) and \(y\) to place the angle in the correct quadrant, returning a value in (-180, 180] degrees (equivalently \((-\pi, \pi]\) radians).

Advertisement

Worked example

For \(x = 3\), \(y = 4\): $$r = \sqrt{9 + 16} = \sqrt{25} = 5$$ The angle is \(\operatorname{atan2}(4, 3) = 0.927295\) rad, which is 53.130102 degrees. So (3, 4) becomes (r = 5, theta = 53.130102 degrees).

For \(x = -1\), \(y = 1\) (second quadrant): \(r = \sqrt{2} = 1.414214\), and \(\operatorname{atan2}(1, -1) = 135\) degrees. Naive \(\arctan(1 / -1)\) would wrongly give -45 degrees, showing why atan2 is essential.

Diagram showing a point on a 2D plane with Cartesian coordinates x and y and polar coordinates r and theta
A point P located by its Cartesian (x, y) and polar (r, θ) coordinates.

Example Conversions Across Quadrants

Each row uses \(r = \sqrt{x^2 + y^2}\) and \(\theta = \operatorname{atan2}(y, x)\). Values are rounded to 6 decimal places.

(x, y) r θ (degrees) θ (radians) θ in 0–360°
(3, 4) 5 53.130102° 0.927295 53.130102°
(−3, 4) 5 126.869898° 2.214297 126.869898°
(−3, −4) 5 −126.869898° −2.214297 233.130102°
(3, −4) 5 −53.130102° −0.927295 306.869898°
(0, 5) 5 90° 1.570796 90°
(−2, 0) 2 180° 3.141593 180°

Worked check for (−3, −4): \(r = \sqrt{(-3)^2 + (-4)^2} = \sqrt{9 + 16} = 5\). The reference angle is \(\arctan(4/3) = 53.130102^\circ\). Because the point is in Quadrant III, \(\theta = -180^\circ + 53.130102^\circ = -126.869898^\circ\), which equals \(233.130102^\circ\) after adding 360°.

Advertisement

FAQ

What angle range does it use? This tool follows the atan2 convention, giving theta in (-180, 180] degrees or \((-\pi, \pi]\) radians. If you prefer a 0 to 360 range, add 360 degrees (or \(2\pi\)) to any negative result.

What happens at the origin? If \(x = 0\) and \(y = 0\), then \(r = 0\) and the angle is mathematically undefined; by convention \(\operatorname{atan2}(0, 0)\) returns 0, so theta is reported as 0.

Why is the angle not arctan(y/x)? Plain arctan loses quadrant information and divides by zero when \(x = 0\). Using atan2 handles every quadrant and the vertical axis correctly.

Last updated:

Most popular in Math and Statistics

View all Math and Statistics calculators