3D vector calculator — cross product, dot product and angle in space

Enter the x, y and z components of two vectors u and v, and the calculator returns the cross product vector, dot product, both lengths, the parallelogram area, the angle between them, and u + v and u − v.

Live demo · real result from this tool
Dot product (u·v)32
Cross product (u×v)
(-3, 6, -3)
|u|
3.741657387
|v|
8.774964387
|u×v| (parallelogram area)
7.348469228
Angle between
12.93315449°
u + v
(5, 7, 9)
u − v
(-3, -3, -3)

Processed on your device — nothing is uploaded.

How to use the 3D vector calculator

  1. Enter vector u as u x, u y and u z.
  2. Enter vector v as v x, v y and v z.
  3. Read Dot product (u·v) and Cross product (u×v).
  4. Check |u|, |v|, |u×v| (parallelogram area), Angle between, u + v and u − v.

What it does and when to use it

Three-dimensional vectors are used in physics, engineering, 3D graphics and robotics. The cross product gives a direction at right angles to two others: the normal to a surface for lighting a 3D model, the axis of a torque, or the direction of a magnetic force. Its length is the area of the parallelogram the two vectors span. The dot product and angle tell you how closely two directions line up, for example the angle between two edges of a roof frame.

For flat problems, the 2D vector calculator adds the projection and unit vector. The length of a vector from one point to another is the 3D distance between them. For bigger systems, the matrix calculator handles determinants, which are closely linked to cross products.

How it works

For u = (u.x, u.y, u.z) and v = (v.x, v.y, v.z):

  • Dot product: u.x·v.x + u.y·v.y + u.z·v.z
  • Cross product: (u.y·v.z − u.z·v.y, u.z·v.x − u.x·v.z, u.x·v.y − u.y·v.x)
  • Magnitude: |u| = √(u.x² + u.y² + u.z²)
  • Parallelogram area: |u×v|
  • Angle: θ = arccos(u·v ÷ (|u| × |v|)), from 0° to 180°

Worked examples

Cross product, step by step. u = (2, −1, 3) and v = (1, 4, −2).

  1. x part: (−1)(−2) − (3)(4) = 2 − 12 = −10.
  2. y part: (3)(1) − (2)(−2) = 3 + 4 = 7.
  3. z part: (2)(4) − (−1)(1) = 8 + 1 = 9.

The tool shows Cross product (u×v): (-10, 7, 9) and a parallelogram area of 15.16575089. The dot product is 2 − 4 − 6 = −8, which is negative, so the angle is wider than 90°: Angle between: 117.8118431°.

Perpendicular vectors. u = (3, 0, 4) and v = (0, 5, 0). The dot product is 0 and the angle is 90°. Both vectors have length 5, so the parallelogram is a 5 by 5 square, and the tool shows |u×v| (parallelogram area): 25. The cross product is (−20, 0, 15).

Limits and tips

  • If either vector is (0, 0, 0), the angle is shown as undefined.
  • Points are not vectors. To get the vector from point P to point Q, subtract P from Q first.
  • Results show up to 10 significant figures; components use whatever unit you typed.
  • The calculation runs in your browser.

Frequently asked questions

Does the order of u and v matter?
For the dot product, the angle and the sum, no. For the cross product, yes. v × u points the opposite way to u × v, so every component changes sign.
How do I know the cross product is right?
It must be perpendicular to both vectors, so its dot product with u and with v is 0. In the first example below, (−10, 7, 9)·(2, −1, 3) = −20 − 7 + 27 = 0.
How do I find the area of a triangle from two edge vectors?
Take half of |u×v|. The tool shows the parallelogram area; the triangle formed by the same two edges is exactly half of it.
Can I use it for 2D vectors?
Yes, set both z values to 0. The cross product then points straight along z, and its z value is the 2D cross product. The 2D vector calculator also gives the projection and unit vector.

Written by the ToolsRift team · Last updated

Pages are drafted with AI assistance and checked by automated tests. How we write and check pages.

Was this tool useful?

Report a problem

Start typing to search every tool.

↑ ↓ to moveEnter to openEsc to close