Quaternion Calculator

Quaternion arithmetic for 3D rotation

About this calculator

The Quaternion Calculator multiplies, adds, subtracts, and divides quaternions and reads the result back as a 3D rotation. It computes the Hamilton product A ⊗ B (and the reverse B ⊗ A to show non-commutativity), the norm |R|, the inverse-based quotient A ⊗ B⁻¹, and the equivalent axis–angle rotation θ about a unit axis. Use it for 3D graphics, robotics, aerospace attitude, and IMU/orientation math where quaternions avoid gimbal lock.

Common examples

  • (1 + 2i + 3j + 4k) ⊗ (5 + 6i + 7j + 8k) = −60 + 12i + 30j + 24k
  • Reverse order (5 + 6i + 7j + 8k) ⊗ (1 + 2i + 3j + 4k) = −60 + 20i + 14j + 32k — a different result
  • 0.7071 + 0.7071i is a unit quaternion: a 90° rotation about the x-axis
  • (0 + 1i + 0j + 0k) is a 180° rotation about the x-axis
  • Dividing a quaternion by itself, A ⊗ A⁻¹, gives the identity 1 + 0i + 0j + 0k