Vector Magnitude Calculator
Calculate the magnitude (Euclidean norm/length) of a vector with any number of components, plus its unit vector — enter 2D, 3D, or n-dimensional coordinates as one comma-separated list.
Input
Comma- or space-separated numbers — 2 for a 2D vector, 3 for 3D, or more for n dimensions.
Output
| Metric | Value |
|---|---|
| No data yet | |
More ways to use this tool
REST API
curl -X POST https://api.iotools.cloud/v1/tool/vector-magnitude-calculator \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"vector": "3, 4, 12"
}'Swap in your own key from your account. The tool's fields are the body — no wrapper.
Ask an AI agent
Use the IOTools `vector-magnitude-calculator` tool (Vector Magnitude Calculator) on this input:
YOUR_INPUT_HEREPaste this at any agent connected to the IOTools MCP server, then add your input.
Embed widget
<iframe
src="https://iotools.cloud/embed/vector-magnitude-calculator/"
width="100%" height="520" frameborder="0" scrolling="no" loading="lazy"
title="Vector Magnitude Calculator — iotools.cloud"
sandbox="allow-scripts allow-forms allow-same-origin allow-downloads allow-popups allow-popups-to-escape-sandbox"
allow="clipboard-write"
style="width:100%;border:1px solid #e5e7eb;border-radius:12px;overflow:hidden"></iframe>
<script src="https://iotools.cloud/embed.js" async></script>Drop this into your own page — free, no key required, just a link back.
| Cost per API/MCP call | From 5 credits |
|---|---|
| Need more credits? | View pricing |
Also available with
Guides
The Vector Magnitude Calculator finds the magnitude (length, or Euclidean norm ‖v‖) of a vector — and its unit vector for free — from any number of components, not just 2D or 3D.
How to use it
- Enter the vector's components as one comma- or space-separated list, e.g.
3, 4, 12for a 3D vector, or5, -5for 2D. - Read the magnitude ‖v‖, the squared magnitude ‖v‖² (handy when you need it without the square root, e.g. comparing distances), and the unit vector — the same vector scaled to length 1, pointing in the same direction.
Because the field takes a plain list rather than separate x/y/z boxes, the same tool works for a 2D vector, a 3D vector, or an n-dimensional one (a feature vector, a weight vector) — just add more components.
The formula
For a vector v = (v₁, v₂, …, vₙ):
‖v‖ = √(v₁² + v₂² + ... + vₙ²)The unit vector is v divided by its own magnitude, v̂ = v / ‖v‖ — every component scaled down so the result has length exactly 1. A zero vector has no direction, so its unit vector is undefined (shown as such rather than dividing by zero).
Common uses
Physics (finding a resultant vector's size after adding force/velocity vectors), computer graphics (normalizing a direction vector for lighting or movement), and machine learning (the L2 norm of a feature or embedding vector).
Privacy
Everything runs entirely in your browser — your numbers are never uploaded or stored anywhere.
Related tools
For a right-triangle-specific version of this same calculation, or to solve a triangle from other known sides/angles, see the Triangle Calculator.