2D Vector Calculator
Find the magnitude and angle of a 2D vector.
Result
How it is calculated
The magnitude is |v| = √(x² + y²), computed with the hypotenuse function and shown to 4 decimals. The direction is θ = atan2(y, x) converted to degrees and shown to 2 decimals. Unlike a plain arctan(y/x), atan2 uses the signs of both components, so the angle lands in the correct quadrant and runs from −180° to 180°, measured counter-clockwise from the positive x axis. A vector with x = 0 and y = 0 has magnitude 0 and the angle is reported as 0°.
Worked example
Take the vector (3, 4). Magnitude: 3² + 4² = 9 + 16 = 25, and √25 = 5.0000. Angle: atan2(4, 3) is the angle whose tangent is 4/3, which is 53.13° above the positive x axis.
Common mistakes
- Computing arctan(y / x) by hand for negative x. A vector at (−3, 4) points at about 126.87°, not −53.13°.
- Expecting an angle between 0° and 360°. Results below the x axis are negative, so −45° means 315°.
- Swapping x and y, which mirrors the angle around 45°.
- Reading the angle as a compass bearing. Bearings start at north and turn clockwise, while this angle starts at east and turns counter-clockwise.
Sources
About this calculator
This calculator finds a 2D vector's magnitude, |v| = √(x² + y²) (from the Pythagorean theorem), and its direction angle, θ = arctan(y/x) (adjusted for the correct quadrant), given its x and y components. Together, magnitude and angle describe the same vector in polar form instead of Cartesian form — the two representations are mathematically interchangeable.
Physics and engineering students use this to convert between component and polar notation for forces, velocities and displacements, and it's a basic building block in computer graphics, robotics and game development for representing direction and speed.
Was this helpful?
You can pick up to 3 reactions.
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
- Loan Calculator
- Profit Calculator
- Discount Calculator
- BMI Calculator
- Percentage Calculator
- Ideal Weight Calculator
- Age Calculator
- Pregnancy Due Date Calculator
- Compound Interest Calculator
- BMR Calculator (Basal Metabolic Rate)
- Tip Calculator
- Fuel Cost Calculator
- Date Difference Calculator
- Sleep Cycle Calculator
- Daily Water Intake Calculator
- Simple Interest Calculator
- Heart Rate Zones Calculator
- Running Pace Calculator
- Pet Age Calculator
- Calories Burned Calculator
- Macro Calculator
- TDEE Calculator (Total Daily Energy Expenditure)
- Waist-to-Hip Ratio Calculator
- Honor Roll Calculator
- One Rep Max (1RM) Calculator
- Ovulation Calculator
- Electricity Cost Calculator
- Unit Price Calculator
- Savings Goal Calculator
- Break-Even Point Calculator
- Paint Calculator
- Course Grade Average Calculator
- Business Days Calculator
- Time Duration Calculator
- Fuel Economy Calculator
- Temperature Converter
- Tile Calculator
- Aspect Ratio Calculator
- Roman Numeral Converter
- Goal Weight Timeline Calculator
- Salary Converter (Hourly to Annual)
- Credit Card Validator (Luhn)
- Body Surface Area (BSA) Calculator
- Feels-Like Temperature Calculator
- Ohm’s Law Calculator
- PPI (Pixel Density) Calculator
- Molar Mass Calculator
- Zodiac Sign Calculator (Western + Chinese)
- IBAN Validator
- Shoe Size Converter
- Country Info & Dialing Code Lookup
- Time Zone Difference (World Clock)
- CAGR (Compound Annual Growth Rate) Calculator
- Rule of 72 Calculator
- Blood Alcohol Content (BAC) Calculator
- Lean Body Mass (LBM) Calculator
- Pythagorean Theorem Calculator
- Speed Converter
- Download Time Calculator
- Date Calculator (Add/Subtract)
No calculators found
Comments (1)
The angle is measured counterclockwise from the positive x axis and runs from minus 180 to 180 degrees, so a vector pointing down-right comes out negative. For a 0 to 360 reading add 360: the vector (3, -4) gives -53.13, which is 306.87. This is not a compass bearing, which counts clockwise from north. Do you need the angle in a different convention, such as a navigation bearing?