Algebra & Calculus

Axis-Angle 3D Rotation & Unit Quaternion Calculator

Rotate a vector actively about a supplied axis and construct the corresponding scalar-first unit quaternion.

How the calculation works

With unit axis u and angle θ, Rodrigues rotation is v′ = v cosθ + (u×v) sinθ + u(u·v)(1−cosθ). Scalar-first quaternion is [cos(θ/2), ux sin(θ/2), uy sin(θ/2), uz sin(θ/2)].

Worked example

Example inputs — Vector to rotate x y z: 1 0 0; Nonzero rotation axis x y z: 0 0 1; Right-handed active rotation angle (degrees): 90. Expected results — Rotated vector X: 0; Rotated vector Y: 1; Rotated vector Z: 0; Quaternion scalar w: 0.7071067812; Quaternion X: 0; Quaternion Y: 0; Quaternion Z: 0.7071067812.

Assumptions and limits

Numerical educational calculation with finite real inputs. Rounding, ill-conditioning and the stated model domain can limit accuracy; this does not manipulate arbitrary symbolic expressions. Right-handed active vector rotation, not a passive coordinate-frame transformation. Axis is normalized automatically; a zero axis is rejected. Quaternion order is (w,x,y,z); q and −q represent the same rotation. Conventions must match any external software.

Reference and further reading

Read the underlying subject reference. Calculith is an independent implementation; the reference does not endorse or certify this tool.

Related calculators

Browse all 1000 calculators →

Example values are editable. Results are estimates where assumptions apply. Calculations run in your browser. Updated 2026-11-16.