Vector Calculator
Compute vector operations — addition, dot product, cross product, magnitude, and angle.
Mode:
Vector A
x
y
Vector B
x
y
Results
| Operation | Result | |
|---|---|---|
| A + B | (4, 6, 0) | |
| A − B | (2, 2, 0) | |
| Dot Product (A · B) | 11 | |
| |A| (Magnitude) | 5 | |
| |B| (Magnitude) | 2.236068 | |
| Angle (degrees) | 10.304846° | |
| Unit Vector A (Â) | (0.6, 0.8, 0) |
About Vector Calculator
This Vector Calculator performs common 2D and 3D vector operations instantly in your browser. Enter the components of two vectors A and B to compute their sum (A+B), difference (A−B), dot product, cross product (in 3D mode), individual magnitudes, the angle between them, and the unit vector of A. When the dot product equals zero, the calculator automatically flags the vectors as perpendicular. All calculations run client-side with no data sent to any server.
Built and maintained by Meet Shah · Last updated
What this tool is used for
- Computing a dot or cross product for a physics or graphics problem.
- Finding the angle between two vectors from their dot product.
- Getting a magnitude and a normalised direction.
- Checking a homework answer with the working visible.
- Checking whether two vectors are orthogonal by seeing the dot product reach zero.
Frequently Asked Questions
- What is the difference between the dot and cross products?
- The dot product returns a *number* measuring how much two vectors point the same way — zero when perpendicular. The cross product returns a *vector* perpendicular to both, whose length is the area of the parallelogram they span.
- Why does the cross product only exist in 3D?
- Because only in three dimensions is there a unique direction perpendicular to two given vectors. In 2D the perpendicular is out of the plane, and in 4D there is a whole plane of them — which is why the 2D "cross product" is really just the scalar z-component.
- How is the angle between two vectors found?
- From the dot product: cos θ = (a · b) ÷ (|a||b|), then take the arc cosine. Because it comes through a cosine, the result is always between 0 and 180° — the unsigned angle, with no sense of which way round you turned.
- What is a unit vector for?
- Direction without magnitude. Dividing a vector by its own length gives a vector of length 1, which is what you want for a surface normal, a camera direction or a movement input — so that speed can be applied separately and consistently.
- Does the order matter?
- For the dot product no, a · b equals b · a. For the cross product very much: a × b is the exact negative of b × a, so swapping the operands flips the resulting normal. That sign flip is behind a great many inside-out 3D models.
Common errors and gotchas
- Confusing the dot and cross products, where one is a scalar and the other a vector.
- Computing a cross product in two dimensions, where it is not defined as a vector.
- Getting the cross product's order wrong, which reverses its direction.
- Forgetting to normalise before using a dot product as a cosine.
- Mixing degrees and radians in the angle result.
Related Calculators tools
Percentage Calculator
Solve percentage, increase, and change calculations.
Age Calculator
Calculate exact age in years, months, and days.
Unix Timestamp Converter
Convert Unix epoch timestamps to and from human dates.
Tip Calculator
Calculate tip and split the bill between people.
Aspect Ratio Calculator
Solve width or height for a target aspect ratio.
Temperature Converter
Convert between Celsius, Fahrenheit, and Kelvin.
Data Storage Converter
Convert between bytes, KB, MB, GB, TB, and more.
Discount Calculator
Calculate sale price and savings from a discount.