Vector Magnitude Calculator (Game Dev)

Enter 2D or 3D vector components to instantly get the magnitude, unit vector, dot product, and cross product.

Dimensions

Vector A

Vector B (for dot / cross product)

Results Click a row to copy

Vector A

Magnitude |A|
Unit Vector (A/|A|)

Vector B

Magnitude |B|
Unit Vector (B/|B|)

Operations (A, B)

Dot Product (A · B)
Angle between A and B
Cross Product (A × B)
|A × B| (cross magnitude)
Copied!

Summary

Enter 2D or 3D vector components to instantly get the magnitude, unit vector, dot product, and cross product.

How it works

  1. Choose 2D or 3D mode using the toggle at the top.
  2. Enter X, Y (and Z for 3D) components for Vector A.
  3. Enter components for Vector B to unlock dot product and cross product.
  4. Read the magnitude, unit vector, and combined operation results instantly.
  5. Click any result row to copy the value to your clipboard.

Use cases

  • Calculating movement speed from a velocity vector in a physics engine.
  • Normalizing a direction vector for projectile or AI steering code.
  • Checking perpendicularity of two vectors using the dot product.
  • Computing a surface normal from two edge vectors via cross product.
  • Verifying manually derived game-math formulas during development.
  • Teaching students the relationship between vector components and length.

Frequently Asked Questions

Last updated: 2026-07-01 · Reviewed by Nham Vu