Rectangular to Polar Coordinates: Convert in Excel With SQRT and ATAN2
Convert rectangular to polar coordinates with the formulas r equals SQRT of x squared plus y squared and theta equals ATAN2, in Excel with SQRT and ATAN2. Get r and theta in degrees and radians, fix the quadrant with MOD, and convert a whole list of points at once.
To convert rectangular to polar coordinates, use SQRT for the radius and ATAN2 for the angle. The two formulas are r = SQRT(x^2 + y^2) and theta = ATAN2(x, y), where ATAN2 in Excel takes x first and y second. Wrap the angle in DEGREES to get degrees, and in MOD to keep it in the range 0 to 360 degrees. You can check any answer instantly with our interactive rectangular to polar converter or learn the math behind it in our rectangular to polar formula guide.
Rectangular to polar coordinates: the two core formulas in Excel
The conversion uses the same two formulas you use by hand, written in Excel form.
In Excel, put x in cell A2 and y in cell B2, then use these formulas.
| Value | Excel formula |
|---|---|
| Radius r | =SQRT(A2^2+B2^2) |
| Angle in radians | =ATAN2(A2,B2) |
| Angle in degrees | =DEGREES(ATAN2(A2,B2)) |
| Angle in degrees, 0 to 360 | =MOD(DEGREES(ATAN2(A2,B2)),360) |
Watch the argument order. Excel ATAN2 takes x first and y second: ATAN2(x_num, y_num). Python math.atan2 takes y first and x second. If you copy a Python formula into Excel without swapping the arguments, your angles will be wrong. The same formulas work in Google Sheets, which also uses ATAN2(x, y).
Do not use ATAN(y / x) for this job. It cannot tell Quadrant I from Quadrant III, or Quadrant II from Quadrant IV, because it loses the sign of x and y when you divide them. It also fails when x is zero. ATAN2 keeps both signs, so it gives the right quadrant every time. For the quadrant rules behind this, read understanding quadrants and atan2 in coordinate conversion.
Worked Examples, Checked in Excel
Every answer below was checked with the formulas above, so the radius and the angle agree with each other. All four examples use a radius of 5 or 13, so they are easy to check by hand.
Example 1: (3, 4), First Quadrant
| Cell | Formula | Result |
|---|---|---|
| Radius | =SQRT(3^2+4^2) | 5 |
| Angle in degrees | =DEGREES(ATAN2(3,4)) | 53.13 degrees |
| Angle 0 to 360 | =MOD(DEGREES(ATAN2(3,4)),360) | 53.13 degrees |
- Radius:
- Angle: degrees
- Polar form:
This is the classic 3, 4, 5 triangle, and it is a good first test for any spreadsheet you build.
Example 2: (-5, 12), Second Quadrant
| Cell | Formula | Result |
|---|---|---|
| Radius | =SQRT((-5)^2+12^2) | 13 |
| Angle in degrees | =DEGREES(ATAN2(-5,12)) | 112.62 degrees |
| Angle 0 to 360 | =MOD(DEGREES(ATAN2(-5,12)),360) | 112.62 degrees |
- Radius:
- Angle: degrees
- Polar form:
Note that the plain arctangent of gives -67.38 degrees, which is wrong by 180 degrees. ATAN2 fixes this by using the negative x value.
Example 3: (-3, -4), Third Quadrant
| Cell | Formula | Result |
|---|---|---|
| Radius | =SQRT((-3)^2+(-4)^2) | 5 |
| Angle in degrees | =DEGREES(ATAN2(-3,-4)) | -126.87 degrees |
| Angle 0 to 360 | =MOD(DEGREES(ATAN2(-3,-4)),360) | 233.13 degrees |
- Radius:
- Angle: degrees, which is the same direction as degrees
- Polar form: in the 0 to 360 range
This is the case where MOD matters most. Without it, Excel gives -126.87 degrees, which is correct but confusing. With MOD(..., 360), the angle becomes 233.13 degrees, which is the form most people expect.
Example 4: (4, -3), Fourth Quadrant
| Cell | Formula | Result |
|---|---|---|
| Radius | =SQRT(4^2+(-3)^2) | 5 |
| Angle in degrees | =DEGREES(ATAN2(4,-3)) | -36.87 degrees |
| Angle 0 to 360 | =MOD(DEGREES(ATAN2(4,-3)),360) | 323.13 degrees |
- Radius:
- Angle: degrees, which is the same direction as degrees
- Polar form: in the 0 to 360 range
How to Convert a Whole List of Points
Set up three columns, x in column A, y in column B, and the formulas in columns C and D. Then drag the formulas down for as many points as you have.
| x | y | r =SQRT(A2^2+B2^2) | theta 0 to 360 =MOD(DEGREES(ATAN2(A2,B2)),360) |
|---|---|---|---|
| 3 | 4 | 5 | 53.13 degrees |
| -5 | 12 | 13 | 112.62 degrees |
| -3 | -4 | 5 | 233.13 degrees |
| 4 | -3 | 5 | 323.13 degrees |
Copy the formulas down the columns and Excel converts the whole list at once. This is the pattern you want for survey data, robot paths, and signal data. If a point is (0, 0), Excel returns r equal to 0 and theta equal to 0. Mathematically, the angle at the origin is undefined, because a point with no distance from the origin has no direction, so treat 0 as a convention and check for the origin in your data.
How to Convert Polar Back to Rectangular in Excel
The reverse conversion uses cosine and sine. Put r in cell A2 and theta in degrees in cell B2.
| Value | Excel formula |
|---|---|
| x | =A2*COS(RADIANS(B2)) |
| y | =A2*SIN(RADIANS(B2)) |
For r equal to 5 and theta equal to 53.13 degrees, this returns x close to 3 and y close to 4, with a tiny floating point rounding difference. The RADIANS call matters: COS and SIN expect radians, so pass degrees into them without converting and every answer after that is wrong.
Common Mistakes
Using ATAN Instead of ATAN2
ATAN(y / x) gives an angle between -90 and 90 degrees only. It puts a second quadrant point in the fourth quadrant and a third quadrant point in the first quadrant. Always use ATAN2(x, y) in Excel, with x first.
Swapping the ATAN2 Arguments
Excel ATAN2(x, y) is x first, y second. Python math.atan2(y, x) is y first, x second. If your angles look 90 degrees off, or your quadrants look swapped, check the argument order first. The same swap applies in Google Sheets.
Mixing Degrees and Radians
ATAN2 returns radians. COS, SIN, and TAN also expect radians. If you pass degrees into them, or print radians and call them degrees, every answer after that is wrong. Convert with DEGREES() for display and RADIANS() before you use an angle in a trig function.
Forgetting to Normalise Negative Angles
ATAN2 returns angles from -180 to 180 degrees. A third quadrant point comes back negative, which surprises people who expect 0 to 360 degrees. Wrap the result in MOD(..., 360) to get the 0 to 360 form, as in the table above.
Rounding Too Early
Keep full precision through the calculation and round only for display. Rounding theta to 53 degrees before you convert back to rectangular coordinates will move the point by a visible amount. Use ROUND only on the displayed result, never on the value you feed into the next formula.
Where It Is Used
Rectangular to polar conversion in Excel shows up in real spreadsheets far more often than in textbook exercises. In surveying, a point is measured in x and y, while a bearing and a distance are the natural polar pair for a waypoint. In robotics, a robot’s position is often measured in x and y, while its steering uses distance and heading, which are r and theta. In engineering, a complex number has magnitude and phase, which are exactly r and theta, and Excel’s IMABS and IMARGUMENT give the same values as SQRT and ATAN2 for a complex input.
For the same conversion in other tools, see our guides on how to convert rectangular to polar in Python, how to convert rectangular to polar in MATLAB, how to convert rectangular to polar in a TI-84, and how to convert rectangular to polar in a Casio calculator.
Frequently Asked Questions (FAQ)
How do I convert rectangular to polar coordinates?
To convert rectangular to polar coordinates, use SQRT for the radius and ATAN2 for the angle. In Excel, with x in A2 and y in B2, use =SQRT(A2^2+B2^2) for r and =DEGREES(ATAN2(A2,B2)) for theta in degrees. For (3, 4), this returns r equal to 5 and theta equal to 53.13 degrees.
What is the Excel formula for theta in polar coordinates?
Use =DEGREES(ATAN2(x, y)) for degrees, or =MOD(DEGREES(ATAN2(x, y)),360) to keep the angle in the range 0 to 360 degrees. Remember that Excel ATAN2 takes x first and y second.
Should I use ATAN2 or ATAN in Excel?
Use ATAN2(x, y). It returns the correct angle in all four quadrants. ATAN(y / x) only returns angles between -90 and 90 degrees, so it gives the wrong quadrant when x is negative, and it fails when x is zero.
How do I get theta in degrees instead of radians in Excel?
Call DEGREES() on the radian value from ATAN2. For (3, 4), ATAN2(3, 4) returns 0.9273 radians, and DEGREES(0.9273) returns 53.13 degrees.
How do I convert a list of points to polar form in Excel?
Put x in column A and y in column B, then put =SQRT(A2^2+B2^2) in column C and =MOD(DEGREES(ATAN2(A2,B2)),360) in column D, and drag both formulas down. Excel converts the whole list at once.
Can I convert polar back to rectangular in Excel?
Yes. With r in A2 and theta in degrees in B2, use =A2*COS(RADIANS(B2)) for x and =A2*SIN(RADIANS(B2)) for y. For r equal to 5 and theta equal to 53.13 degrees, this returns x close to 3 and y close to 4, with a tiny floating point rounding difference.