Use this free 2d vector calculator to find the magnitudes, dot product, signed cross product and angle of two vectors in a plane. Enter their x and y components to compare their lengths and directions.
Vectors
2D Vector Calculator
Enter two 2D vectors to find their magnitudes, dot product, signed cross product and the angle between them.
Dot product A · B
—
Enter both vectors, then calculate.
- Magnitude |A|
- Magnitude |B|
- Signed cross product (z)
- Angle in degrees
- Angle in radians
The dot product is the sum of matching component products. For nonzero vectors, a zero dot product means the vectors are perpendicular.
The 2D cross product shown here is the signed scalar AₓBᵧ − AᵧBₓ. Positive means B is counterclockwise from A; negative means clockwise. Its absolute value is the parallelogram area.
Answers are rounded for display; calculations use unrounded values.
For vector calculations on your phone, Unit Converter is free to download and includes a Vector Calculator (2D).
How to use this tool
- Enter the x component and y component of Vector A.
- Enter both components of Vector B, using the same coordinate system and compatible units.
- Click Calculate to see the magnitudes, products and angle. An angle involving a zero vector is undefined.
What is a 2D vector?
A two-dimensional vector describes a quantity with size and direction in a plane. A displacement tells you how far something moves and in which direction; a velocity combines speed with direction. On a diagram, the arrow’s length represents the size of the vector, and its arrowhead shows the direction.
The x and y components describe that vector along two perpendicular axes. A 2d vector calculator uses the components of two vectors to find their lengths, their dot product, their signed cross product and the angle between them.
Components and vector magnitude
Write Vector A as (Aₓ, Aᵧ). The subscripts identify the axes: Aₓ is the signed amount along x, and Aᵧ is the signed amount along y. A negative component points against that axis’s positive direction. For a displacement from a starting point to an ending point, each component is the ending coordinate minus the corresponding starting coordinate.
The vector magnitude, written |A|, is the arrow’s length. Its components form the perpendicular sides of a right triangle, so the Pythagorean theorem gives:
|A| = √(Aₓ² + Aᵧ²)
The same formula applies to Vector B. Magnitude is nonnegative and has the same unit as the components: it represents distance for a displacement vector and speed for a velocity vector. See OpenStax’s explanation of vectors in the plane.
What the dot product measures
The dot product combines two vectors into a scalar, meaning a single number. Multiply the matching components and add the results:
A · B = AₓBₓ + AᵧBᵧ
Its geometric meaning comes from the relationship A · B = |A||B| cos θ, where θ is the angle between the vectors. The result depends on both their lengths and how closely their directions align. For nonzero vectors, a positive dot product means an angle below 90°, zero means a right angle, and a negative result means an angle above 90°. Vectors that meet at a right angle are also called orthogonal.
Swapping A and B leaves the dot product unchanged. A vector dotted with itself gives its magnitude squared. These relationships are developed in OpenStax’s dot product chapter.
Finding the angle between vectors
Place the arrows with their tails at the same point. The angle between vectors is the smaller angle from one direction to the other, between 0° and 180°, or 0 and π radians. The relationship above can be rearranged as:
cos θ = (A · B) ÷ (|A||B|)
Taking the inverse cosine gives θ, as explained in MIT’s dot product notes. Matching directions have an angle of zero; opposite directions have an angle of 180°. The calculator displays the angle in both degrees and radians. If either vector has zero magnitude, there is no direction to compare, so the angle is undefined.
The signed cross product in two dimensions
For vectors in the xy plane, the signed cross product is the number:
C = AₓBᵧ − AᵧBₓ
This is the z component of the three-dimensional cross product when both input vectors have zero z components. That three-dimensional vector points perpendicular to the plane, so its signed z component captures the result. The NIST vector formulas give the component expression and its right-hand orientation.
With the usual x axis pointing right and y axis pointing up, a positive C means the smaller turn from A to B is counterclockwise; a negative C means clockwise. Swapping the order reverses the sign. This orientation information is separate from the unsigned angle displayed by the calculator.
For two nonzero vectors, C = 0 means they are parallel, whether they point the same way or in opposite directions. If either vector is zero, C is also zero.
Using the cross product to find area
Two displacement vectors placed tail to tail can form the adjacent sides of a parallelogram. Its area is |C|, the absolute value of the signed cross product. The triangle between the same two sides has half that area:
Parallelogram area = |C|
Triangle area = |C| ÷ 2
When both vectors’ components use a common length unit, these areas use the corresponding square unit. The absolute value removes the orientation sign: reversing the order changes the sign of C but leaves the area unchanged. OpenStax derives this area relationship from base times perpendicular height.
More tools: Browse all calculators and unit converters.
Calculate 2D vectors on your phone
Keep the Vector Calculator (2D) handy in Unit Converter. Download it free from the App Store or Google Play.

