Life Calculator
MAKE THE FORMULA CLEAR

Vector dot product, cross product and angle

Calculate the dot product, cross product, lengths and angle of two real 2D or 3D vectors.

Start with your own numbers

Editable example

An example is filled in. Replace it with your own data to calculate.

Use matching dimensions for both vectors. Enter zero for both z coordinates in 2D.

Loading calculator…

Enter a signed coordinate; both vectors must use the same dimensions.
Enter a signed coordinate; both vectors must use the same dimensions.
Enter a signed coordinate; both vectors must use the same dimensions.
Enter a signed coordinate; both vectors must use the same dimensions.
Enter a signed coordinate; both vectors must use the same dimensions.
Enter a signed coordinate; both vectors must use the same dimensions.

Results update when inputs are complete. A plan is kept only when you save it. Inputs and results are not uploaded.

Saved plans →

Saved in this browser. Before changing devices, export a backup from My tools.

Example result

Dot product

0

The angle is undefined if either vector has zero length. Results are floating-point approximations.

Length of vector A5
Length of vector B5
Angle between vectors90 degrees
A × B cross product(0, 0, -25)
Cross-product magnitude and parallelogram area25

Worked steps

  1. Dot product = sum of products of corresponding coordinates.
  2. Vector length = square root of the sum of squared coordinates.
  3. For nonzero vectors, divide the dot product by both lengths and take the inverse cosine. A zero-vector angle is undefined.
  4. The cross product uses A × B order; its magnitude is the parallelogram area.
  5. Results show up to ten significant digits and are floating-point approximations.

Dot product is the sum of corresponding coordinate products; length is the square root of the sum of squares. For nonzero vectors the angle is the inverse cosine of the dot product divided by their lengths, from 0 to 180 degrees. A zero vector has no defined angle, and a zero dot product alone does not make it perpendicular. Coordinates range from −1,000,000 to 1,000,000 with up to six decimal places. Results are floating-point approximations; projection is not calculated. The cross product uses A × B order, and its length is the parallelogram area.

Method and scope

Enter zero for both z coordinates when using 2D vectors; both vectors must have the same dimensionality.

If either vector is zero the dot product exists but its angle is undefined. Results are floating-point approximations.

References:OpenStax: cross products and area、National Academy for Educational Research: vector dot product、National Central University: vector dot product

Purpose

Calculate the dot product, each length and the angle between two real two- or three-dimensional vectors.

Inputs

Enter x, y and z coordinates for both vectors. For two-dimensional vectors set both z coordinates to zero.

Formula

Multiply corresponding components and sum for the dot product; take the square root of the sum of squares for length.

Example

For A=(3,4,0) and B=(4,-3,0), the dot product is 0, both lengths are 5, and the angle is 90 degrees.

Result

A zero dot product means nonzero vectors are perpendicular. The angle of a zero vector is undefined.

Limits

Coordinates are limited to ±1,000,000 and six decimal places. Results are approximate; projection is not calculated. A × B magnitude is the parallelogram area.

Keep it handy for next time

Add Vector dot product, cross product and angle to your home screen

This icon opens this tool. Confirm installation in your browser.

  1. iPhone: Open in Safari, tap Share → Add to Home Screen, then confirm.
  2. Android: Open in Chrome and choose Install app or Add to Home screen from the menu.
  3. In an in-app browser such as LINE or Facebook, use its menu to open the page in Safari or Chrome first.

Browser options vary. A shortcut does not provide cross-device synchronization, and an installed app may have separate storage. Export a backup from My tools first. The first load requires a connection.

Checking offline data.