ToolJoltTools

Vector Dot & Cross Product Calculator

Dot product, cross product, the angle between two 3D vectors and whether they're parallel or perpendicular.

Dot product (A·B)
Cross X
Cross Y
Cross Z
Angle between (°)

Dot product tests alignment (positive = same hemisphere, zero = perpendicular, used for lighting N·L and back-face culling). Cross product gives a perpendicular vector (surface normals, torque) following the right-hand rule. Together they're the workhorses of all 3D math.

Formula

A·B = Σ aᵢbᵢ = |A||B|cosθ (scalar) · A×B = perpendicular vector, |A×B| = |A||B|sinθ · θ = acos(A·B / |A||B|)
References: Lengyel (2011), Mathematics for 3D Game Programming and Computer Graphics

About Vector Dot & Cross Product Calculator

The dot and cross products are the two operations underpinning all 3D graphics, physics and geometry. The dot product (a scalar) measures alignment — it drives diffuse lighting (N·L), back-face culling, and projection, and its sign tells you whether two vectors point the same way. The cross product (a vector) produces a result perpendicular to both, giving surface normals, torque and the area of a parallelogram. This calculator computes both for two 3D vectors plus the angle between them, and flags the special parallel and perpendicular cases that come up constantly in graphics code.

How to use Vector Dot & Cross Product Calculator

  1. 1Enter your values into Vector Dot & Cross Product Calculator — sensible, domain-typical defaults are pre-filled so you see a real result immediately.
  2. 2The result recomputes live using the formula shown on the page; there is no button to press.
  3. 3Adjust any input to compare scenarios, then read the worked example to see the substituted numbers.

Why use Vector Dot & Cross Product Calculator?

  • Computes Vector Dot & Cross Product instantly in your browser — no sign-up, no upload, no server round-trip.
  • 100% free and unlimited, with the exact formula shown: A.
  • Runs entirely client-side, so every value you enter stays private on your device.
  • Live recompute as you type, with a worked example and authoritative references for trust.

Frequently asked questions

What does the sign of the dot product tell me?+

Direction agreement: positive means the vectors point into the same hemisphere (angle < 90°), zero means perpendicular (90°), negative means they oppose (> 90°). This is why lighting uses max(0, N·L) — a negative dot means the surface faces away from the light, so it gets no diffuse illumination. Back-face culling uses the same sign test.

Why does the cross product give a perpendicular vector?+

By construction A×B is orthogonal to both inputs, with length |A||B|sin(θ) (the area of the parallelogram they span) and direction set by the right-hand rule. That's exactly what you need for surface normals (perpendicular to a triangle's edges), torque (perpendicular to force and lever arm), and building orthonormal coordinate frames.

How do I get the angle between two vectors?+

From the dot product: θ = acos(A·B / (|A||B|)). Normalize out the magnitudes and the dot product becomes the cosine of the angle. For the signed angle in a plane (which side?), combine with the cross product's sign — the dot gives magnitude, the cross gives orientation.

What's the right-hand rule for cross products?+

Point your right hand's fingers along A, curl them toward B, and your thumb points along A×B. It determines the sign/direction of the result — and swapping the operands flips it (A×B = −B×A). Graphics APIs assume a handedness convention (OpenGL right-handed, DirectX often left-handed), so normal directions depend on getting this consistent.

Related tools

Related 3D & VR tools

Sponsored