Coordinate Rotation Calculator

CNC SETUP
New X
New Y
X’ = X·cosθ − Y·sinθ. Y’ = X·sinθ + Y·cosθ. Standard 2D coordinate rotation about origin, counterclockwise positive.

Why coordinate rotation matters

Parts do not always sit square on the table, and hole patterns or features are not always laid out along the machine axes. Rather than re-deriving every point on a rotated feature by hand, this rotates an entire set of X and Y coordinates about the origin by a given angle, which is exactly what happens internally when a control applies a coordinate system rotation.

How the numbers are calculated

The new X coordinate is the original X times the cosine of the rotation angle, minus the original Y times the sine of the angle. The new Y coordinate is the original X times the sine of the angle, plus the original Y times the cosine of the angle. This is the standard two-dimensional rotation transformation, with a positive angle representing counterclockwise rotation about the origin.

Practical tips

Make sure the point being rotated is expressed relative to the actual center of rotation before running this calculation, since the formula rotates about the origin, not about an arbitrary point. If a feature needs to rotate about a point other than zero, zero, subtract that center point from the coordinates first, rotate, then add the center point back in afterward.

Spotted an error or have a suggestion for this calculator? Let us know →
Scroll to Top

The calculators and tools on Formula Factory are provided for general guidance and informational purposes only. Results are estimates based on standard formulas and the values you enter — they do not constitute professional engineering, electrical, or architectural advice. Always verify calculations with a qualified professional before making decisions for any safety-critical, code-compliance, or commercial application. Formula Factory makes no representations or warranties as to the accuracy or completeness of any result, and accepts no liability for errors, omissions, or any outcomes arising from reliance on this information.