Skip to main content

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

Magnitude
MetricValue
No data yet
Was this helpful?

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_HERE

Paste 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 callFrom 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

  1. Enter the vector's components as one comma- or space-separated list, e.g. 3, 4, 12 for a 3D vector, or 5, -5 for 2D.
  2. 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.

For a right-triangle-specific version of this same calculation, or to solve a triangle from other known sides/angles, see the Triangle Calculator.

vector lengtheuclidean normvector normunit vectornormalize vectorvector mathlinear algebra2d vector3d vector

Love the tools? Lose the ads.

One payment clears every ad from your account, for good. No subscription, no tracking.