A rotation calculator turns points around a center by an angle and tells you the new coordinates. Enter the angle, the center if it is not the origin, and one or more points, and it gives the rotated points, together with the cosine and the sine that it used and the formulas. It handles 90, 180 and 270 degrees as well as any other angle, and you can rotate clockwise or counterclockwise in degrees or radians. It runs in your browser.
How to use the rotation calculator
- Enter the angle and choose degrees or radians, and the direction.
- Enter the center of rotation, or leave it at the origin.
- Type the points, one per line, as x, y.
- Press Rotate.
The rotation formula
The Wikipedia article on rotation matrices gives the two-dimensional rotation matrix R(θ) with the rows (cos θ, −sin θ) and (sin θ, cos θ). The new coordinates (x′, y′) of a point (x, y) after the rotation are x′ = x cos θ − y sin θ and y′ = x sin θ + y cos θ.[1] The page says that the rotation is counterclockwise if θ is positive, such as 90 degrees, and clockwise if θ is negative.[1] The point (1, 0) rotated by θ goes to (cos θ, sin θ), and the point (0, 1) goes to (−sin θ, cos θ).[1] For a rotation by 30 degrees, the point (1, 0) goes to (0.866, 0.5).
The special angles
The page lists the common rotations. The matrix for 90 degrees has the rows (0, −1) and (1, 0), for 180 degrees it has (−1, 0) and (0, −1), and for 270 degrees it has (0, 1) and (−1, 0).[1] Applying them gives simple rules: a rotation of 90 degrees counterclockwise sends (x, y) to (−y, x), 180 degrees sends it to (−x, −y), and 270 degrees sends it to (y, −x). Those rules are worked out from the matrices, and the calculator uses the general formula, so you can check them. A rotation of 90 degrees counterclockwise takes (3, 4) to (−4, 3), and a rotation of 360 degrees brings every point back to where it started.
Rotating about another center
To rotate about a point other than the origin, move the center to the origin, rotate, and move it back. If the center is (a, b), then the new point is (a + (x − a) cos θ − (y − b) sin θ, b + (x − a) sin θ + (y − b) cos θ). This is the standard method, and it is not stated on the pages. The Wikipedia article on rotations notes that rotations about different points do not commute in general.[2] Take the center (1, 1) and the point (2, 1). The point is one unit to the right of the center, so after 90 degrees counterclockwise it is one unit above the center, at (1, 2).
What stays the same
A rotation is a rigid motion. The article says that a Euclidean motion leaves the distance between any two points unchanged, and that a proper rotation also keeps the orientation.[2] It says that the vectors (x, y) and (x′, y′) have the same magnitude and are separated by an angle θ.[2] So a rotated triangle has the same side lengths and angles as the original, and the distance of each point from the center does not change. The page adds that the transpose of a rotation matrix is its inverse, and that its determinant is 1, which means that rotating by −θ undoes a rotation by θ.[1] You can check your work by rotating by the angle and then by the opposite angle.
Rotating a shape
To rotate a polygon, rotate each of its vertices and join them in the same order. Enter the vertices, one per line, and the calculator rotates all of them in one go. A square with the corners (0, 0), (2, 0), (2, 2) and (0, 2) rotated by 90 degrees about the origin goes to (0, 0), (0, 2), (−2, 2) and (−2, 0). Choose the center (1, 1) and the square turns into itself, with the corners swapped around, because it is the center of the square.
Screens and graphics
The page notes that the rotation looks clockwise with axes where the y-axis points down, which is common on screens, though the formulas stay the same. If you work with images or game coordinates, remember this, and use the opposite direction if needed. In radians, the angle 90 degrees is π ÷ 2, about 1.5708, and 180 degrees is π, about 3.14159.
Rotating by a negative or large angle
You can enter a negative angle, such as −90, and it turns the point the other way, the same as choosing clockwise. Angles above 360 degrees wrap around, so 450 degrees is the same as 90 degrees. This is handy when an angle comes from a calculation, such as a total of several turns. The matrix row shows the cosine and the sine that are used, so you can see at once that 90 degrees gives a cosine of 0 and a sine of 1, and that 45 degrees gives about 0.7071 for both.
Common mistakes
- Mixing degrees and radians. Choose the unit that matches your angle.
- Forgetting the center. Rotation about a point other than the origin needs the center.
- Using the wrong direction. A positive angle is counterclockwise.
- Swapping the order of two rotations about different centers. The result can change.
What next
Use this often? Add Rotation to your Home screen.
Frequently asked questions
What is a rotation calculator?
A tool that finds the new coordinates of points after they are turned about a center by an angle.
What is the formula for rotating a point?
x′ = x cos θ − y sin θ and y′ = x sin θ + y cos θ, for a counterclockwise rotation by θ about the origin.
What happens to (x, y) in a 90 degree rotation?
Counterclockwise, it goes to (−y, x). For (3, 4) that is (−4, 3).
How do I rotate about a point other than the origin?
Subtract the center, rotate, and add the center back. The calculator does this when you enter the center.
Does rotation change distances?
No. A rotation keeps the distance between any two points, and the distance of each point from the center.
Was this tool helpful?
What went wrong?
We only receive the reason you pick, never what you typed into the tool.
Thanks for your feedback.