Logo

MonoCalc

/

Coordinate Rotation Calculator

Geometry

Point to Rotate

New X

-4

New Y

3

Angle

90° / 1.5708 rad

Displacement

7.0711

Rotation Matrix (2×2)

[ 0 -1 ]

[ 1 0 ]

Diagram

centeroriginalrotated

About This Tool

Coordinate Rotation Calculator – Rotate Points in 2D and 3D

Rotating a point is one of the most common transformations in computer graphics, robotics, engineering, and coordinate geometry. Whenever a sprite spins on screen, a robotic arm sweeps through an angle, or a CAD drawing gets reoriented, the underlying math is the same: a rotation matrix applied to a set of coordinates. This calculator computes the new position of a point after rotating it by any angle around the origin, a custom pivot, or one of the three axes in 3D space.

The 2D Rotation Formula

To rotate a point (x, y) by angle θ around the origin (0, 0), the standard rotation matrix gives:

x' = x·cos(θ) − y·sin(θ)
y' = x·sin(θ) + y·cos(θ)

For example, rotating the point (3, 4) by 90° givesx' = 3·cos(90°) − 4·sin(90°) = −4 andy' = 3·sin(90°) + 4·cos(90°) = 3, so the rotated point is(−4, 3).

Rotating Around a Custom Pivot

When rotating around a point other than the origin — a pivot (cx, cy) — the calculation happens in three stages: translate the point so the pivot sits at the origin, apply the standard rotation, then translate back:

x' = cx + (x − cx)·cos(θ) − (y − cy)·sin(θ)
y' = cy + (x − cx)·sin(θ) + (y − cy)·cos(θ)

This translate-rotate-translate-back sequence is exactly what the step-by-step accordion in the calculator shows, making it easy to follow how each intermediate value is derived.

3D Rotation About the X, Y, and Z Axes

In three dimensions, a rotation happens around one of the coordinate axes, and each axis has its own 3×3 rotation matrix. Rotating around the Z-axis behaves like a 2D rotation in the XY-plane while Z stays fixed; rotating around the X-axisrotates the YZ-plane, and rotating around the Y-axis rotates the XZ-plane. For instance, rotating (0, 1, 0) by 90° about the X-axis produces (0, 0, 1), since the rotation swings the Y-component into the Z-component.

Degrees, Radians, and Unit Conversion

Angles can be entered in either degrees or radians. Internally, every calculation converts the angle to radians before calling Math.cos and Math.sin, using:

rad = deg × (π / 180) and deg = rad × (180 / π)

The calculator always displays the angle in both units so you can cross-check your input and results regardless of which convention your project uses.

Displacement and the Rotation Matrix

Alongside the new coordinates, the tool reports the displacement — the straight-line distance between the original and rotated point — and displays the full rotation matrix used in the calculation. Seeing the matrix explicitly is useful for verifying hand calculations, debugging a graphics transform pipeline, or understanding how rotation matrices compose with translation and scaling in a broader transformation stack.

Floating-point precision
Trigonometric results occasionally produce tiny values like 1.2e-16 instead of an exact 0 due to floating-point rounding. Any result within 1e-10 of zero is automatically snapped to 0 for a cleaner display.

Common Applications

  • Computer graphics and game development — rotating sprites, meshes, or camera orientations frame by frame
  • Robotics — computing joint and end-effector positions as a robotic arm sweeps through an angle
  • CAD and engineering design — reorienting parts, drawings, or assemblies around a reference point
  • Physics simulations — modeling rotational motion of objects or reference frames
  • Mathematics education — visualizing how coordinate geometry transformations work step by step

Batch Rotation of Multiple Points

Many real problems require rotating several points together — the vertices of a triangle, the corners of a bounding box, or a full polygon outline — using the same angle and center so the shape rotates as a rigid body. Applying the same formula to each vertex individually preserves the shape's size and internal angles while only changing its orientation.

Frequently Asked Questions

Is the Coordinate Rotation Calculator free?

Yes, Coordinate Rotation Calculator is totally free :)

Can I use the Coordinate Rotation Calculator offline?

Yes, you can install the webapp as PWA.

Is it safe to use Coordinate Rotation Calculator?

Yes, any data related to Coordinate Rotation Calculator only stored in your browser (if storage required). You can simply clear browser cache to clear all the stored data. We do not store any data on server.

How does this coordinate rotation calculator work?

Enter a point's x and y coordinates (and z for 3D mode), a rotation angle, and optionally a pivot point or rotation axis. The calculator converts the angle to radians, applies the appropriate rotation matrix, and returns the new rotated coordinates along with the matrix used and a step-by-step derivation.

What is the formula for rotating a point around the origin?

For 2D rotation about the origin by angle θ: x' = x·cos(θ) − y·sin(θ) and y' = x·sin(θ) + y·cos(θ). To rotate about a custom pivot (cx, cy), the point is first translated so the pivot sits at the origin, rotated, then translated back.

How does 3D rotation differ from 2D rotation?

3D rotation rotates a point around one of the three coordinate axes (X, Y, or Z) using a dedicated 3×3 rotation matrix for that axis. Rotating about the Z-axis behaves like a standard 2D rotation in the XY-plane while leaving Z unchanged; rotating about X or Y works the same way in their respective perpendicular planes.

Can I rotate multiple points at once?

Yes. Batch mode lets you enter a list of points that are all rotated by the same angle and around the same center or axis in one calculation — useful for rotating the vertices of a shape like a triangle or polygon.

Why do some results show 0 instead of a tiny decimal?

Trigonometric functions like sine and cosine can introduce floating-point rounding noise (e.g. 1.2246e-16 instead of exactly 0). Any result within 1e-10 of zero is automatically snapped to exactly 0 for cleaner, more readable output.

How accurate are the rotation results?

Calculations use JavaScript's 64-bit floating-point arithmetic (IEEE 754) with native Math.cos and Math.sin functions, giving results accurate to about 15 significant digits. Displayed values are rounded to your chosen precision, from 0 to 10 decimal places.