Quaternion rotation calculator

Calculate rotated vector and normalised quaternion w,x,y,z with your own figures.

Your numbers

Use the units shown. Results update as you change valid inputs.

Use rotated vector and normalised quaternion w,x,y,z to compare changes to your inputs. The method and limits below explain the scope.

Examples

Examples

Try the starting example

Vector to rotate, x,y,z
1,0,0
Rotation input: axis-angle or quaternion
axis-angle
Axis x,y,z
0,0,1
Right-handed angle (degrees)
90
Quaternion w,x,y,z
1,0,0,0
Rotated vector
0, 1, 0
Normalised quaternion w,x,y,z
0.707106781187, 0, 0, 0.707106781187
Original vector norm
1
Rotated vector norm
1

Try another scenario

Vector to rotate, x,y,z
1,0,0
Rotation input: axis-angle or quaternion
quaternion
Axis x,y,z
0,0,1
Right-handed angle (degrees)
90
Quaternion w,x,y,z
0,0,0,2
Rotated vector
-1, 0, 0
Normalised quaternion w,x,y,z
0, 0, 0, 1
Original vector norm
1
Rotated vector norm
1
Calculation method

Calculation method

Rotated vector

Apply the unit-quaternion rotation q×(0,v)×conjugate(q), using the equivalent dot/cross-vector expression.

Normalised quaternion w,x,y,z

For axis-angle, normalise the axis and use (cos(angle/2),axis×sin(angle/2)); otherwise normalise the four supplied quaternion components.

Original vector norm

Euclidean norm before rotation.

Rotated vector norm

Euclidean norm after rotation; rigid rotation should preserve this up to roundoff.

Symbols and units
a
Vector to rotate, x,y,z
b
Rotation input: axis-angle or quaternion
c
Axis x,y,z
d
Right-handed angle (degrees)
e
Quaternion w,x,y,z

Use the units shown. A list keeps the order in which you enter its values. The symbol ^ means “raised to the power of”.

Assumptions & limits

Assumptions & limits

  • Right-handed active rotation in three-dimensional Euclidean coordinates, with quaternion order w,x,y,z. Zero axes or zero quaternions in the selected input mode are rejected. Double-precision results are approximate. Numeric tables use 12 significant digits and display components at roundoff scale (32 machine epsilons relative to their row or relevant calculation scale) as zero; scalar diagnostics retain full precision.
Are these inputs private?

These calculations run in your browser. A shared link contains the values you choose to share. Only questions submitted to the separate AI finder are sent to OpenAI.

Further reading

ROS 2: quaternion fundamentals and rotation conventions ↗

Background reading; this does not imply endorsement or independent review of SumFizz.

Share this page
Share this calculator

Leave unchecked to share the page without your entered values.