Vector Calculator
Compute the dot product, cross product, magnitude, angle and projection of 2D or 3D vectors, plus addition, difference and unit vectors. Free, runs in your browser.
Vector Calculator
How to Use the Vector Calculator
Choose 2D or 3D
Pick whether your vectors live in the plane (x, y) or in space (x, y, z). The input boxes adjust to match, pre-filled with an example.
Enter components
Type each component of vector A and vector B. Decimals and negatives are fine, and blanks count as zero. Results update instantly.
Read the products
See the dot product, the cross product, each vector's magnitude, and the angle between them in degrees and radians — the core quantities of vector algebra.
Explore the rest
The calculator also shows A + B, A − B, the projection of A onto B, the distance between them, and the unit vectors pointing the same way as A and B.
Vectors: Quantities With Direction
Two Ways to Multiply
A vector is a quantity that has both a size and a direction — a velocity, a force, a displacement — and representing it as a list of components, like (3, 4) or (1, 2, 2), lets us calculate with it. Adding vectors places them tip to tail; scaling one stretches it; but the two operations that make vectors so powerful are the two ways of multiplying them. The dot product multiplies two vectors to give a single number that measures how much they point in the same direction: it is largest when they are parallel, zero when they are perpendicular, and negative when they oppose. From the dot product you get the angle between two vectors, the work done by a force, and the projection of one vector onto another — the "shadow" A casts along B. This calculator computes all of these, for vectors in two or three dimensions, the instant you type.
The cross product is the other multiplication, and it is special to three dimensions. It takes two vectors and produces a third vector at right angles to both, whose length equals the area of the parallelogram they span and whose direction follows the right-hand rule. The cross product is how you find a surface's normal direction in computer graphics, the torque a force produces about a pivot, and the magnetic force on a moving charge. In two dimensions there is no perpendicular direction left over, so the cross product collapses to a single signed number — the z-component — which still tells you the signed area and which way one vector turns relative to the other; this calculator reports that for 2D and the full vector for 3D. Alongside these it gives each vector's magnitude (its length, by the Pythagorean theorem), the unit vectors that capture pure direction, and the straight-line distance between the two vectors' tips. Everything is computed locally in your browser.
"The dot product asks how much two vectors agree in direction; the cross product builds a new vector perpendicular to both. Together they turn geometry into arithmetic."
Vectors at Work
Vectors are the native language of physics and engineering, where almost every quantity that matters — force, velocity, acceleration, momentum, electric and magnetic fields — has a direction as well as a magnitude. The dot product computes work and energy; the cross product computes torque and angular momentum. In computer graphics and games, surface normals found by cross products determine how light reflects, and dot products decide how brightly a surface is lit. Navigation and robotics use vectors to represent position and heading; machine learning represents words, images and users as high-dimensional vectors and measures their similarity with — exactly — the dot product and the angle between them, the same quantities this tool computes. Even the projection shown here is the heart of least-squares fitting, the technique behind linear regression. Whether you are studying vector algebra, checking a physics problem, or building intuition for how direction and magnitude combine, this calculator gives you every standard vector quantity at once, instantly and privately.
10 Facts About Vectors
A vector has both magnitude and direction — unlike a plain number.
The dot product is zero exactly when two vectors are perpendicular.
The cross product gives a vector perpendicular to both inputs.
A cross product's length equals the area of the parallelogram spanned.
The dot product computes work; the cross product computes torque.
A unit vector has length 1 and captures pure direction.
The cross product follows the right-hand rule for its direction.
Magnitude is just the Pythagorean theorem in any dimension.
AI measures similarity using the dot product and angle between vectors.
This calculator runs in your browser — nothing is uploaded.
Frequently Asked Questions
- The dot product multiplies two vectors to give a single number that measures how much they point the same way. It is largest when they are parallel, zero when perpendicular, and negative when they oppose. From it you get the angle between vectors and the projection of one onto another.
- In three dimensions, the cross product takes two vectors and produces a third vector perpendicular to both, with a length equal to the area of the parallelogram they span and a direction given by the right-hand rule. It is used for surface normals, torque, and angular momentum.
- In the plane there is no third direction for a perpendicular vector to point, so the cross product reduces to its z-component — a signed number. It still tells you the signed area of the parallelogram and which way one vector turns relative to the other.
- From the dot product: dividing it by the product of the two magnitudes gives the cosine of the angle, and taking the inverse cosine gives the angle itself. The calculator shows the result in both degrees and radians.
- The projection of A onto B is the "shadow" that A casts along the direction of B — the part of A that lies in B's direction. The calculator gives both the scalar projection (a length) and the vector projection (the actual vector). Projections are the basis of least-squares fitting.
- A unit vector has length exactly 1 and points in the same direction as the original. Dividing a vector by its own magnitude "normalises" it to a unit vector, isolating pure direction from size — useful whenever only the direction matters.
- By the Pythagorean theorem: square each component, add them, and take the square root. For (3, 4) the magnitude is 5; for a 3D vector you simply include the third component. It is the straight-line length of the vector.
- No. Every calculation runs in your browser with a small built-in engine — nothing is uploaded to a server or third-party library, and the tool works offline once the page has loaded.
- Yes. Each component accepts decimals and negative numbers, and any blank box is treated as zero. The results recalculate instantly as you type.
- Completely free, with no account, sign-up, or usage limit. It runs entirely in your browser and collects no data. Use it as much as you like.
Related News
You may be interested in these recent stories from our newsroom.
No related news yet for this tool. Our editorial team publishes new pieces every week.
Browse all news →75 more free tools
Calculators, converters, security tools — no signup.