Lorentz force calculator
A 2 C charge moving at 3 m/s along x, with a 4 V/m electric field along y and a 5 T magnetic field along z, feels 22 N along minus y. Enter the charge and three vectors to get the full Lorentz force. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Charge
- 2
- Velocity
- 3, 0, 0
- Electric field
- 0, 4, 0
- Magnetic field
- 0, 0, 5
- Force
- 0, -22, 0 N
- Force x
- 0
- Force y
- -22
- Force z
- 0
The Lorentz force is the electromagnetic force on a charged particle that moves through an electric field and a magnetic field at the same time: F equals q times the vector sum of E and the cross product of v with B. That identity is the working equation behind cathode-ray deflection, Hall voltage, cyclotron orbits, mass-spectrometer separation, and every first-year problem that asks for the newton force on an ion in crossed fields. This Lorentz force calculator accepts a finite charge in coulombs and three-dimensional velocity, electric-field, and magnetic-field vectors in SI units, evaluates the cross product and the linear combination with deterministic floating-point arithmetic, and returns the force vector in newtons together with its Cartesian components and magnitude.
How the Lorentz force vector F = q(E + v × B) is computed
The full Lorentz force on a point charge q is the product of that charge with the sum of the electric field E and the cross product of the velocity v with the magnetic field B. In SI units q is in coulombs, v is in metres per second, E is in volts per metre (equivalently newtons per coulomb), B is in tesla, and the resulting force F is in newtons.
The electric term qE is parallel or anti-parallel to E depending on the sign of q and does not depend on whether the particle is moving. The magnetic term q times v cross B is always perpendicular to both v and B by the right-hand rule, does no mechanical work, and vanishes when the charge is at rest or when v is parallel to B. This capability evaluates that vector identity, not the scalar classroom shortcut F equals q v B sin theta.
That shortcut is the magnitude of the magnetic piece alone, for a chosen angle between v and B, and is a different search intent already served by a magnetic-force landing. Relativistic corrections, radiation reaction, force on a current-carrying wire I L cross B, and cyclotron radius formulas are also out of scope.
Where a vector Lorentz force calculator shows up in real work
Introductory physics and electrical-engineering courses constantly assign F equals q times E plus v cross B so students can combine a uniform electric field with a uniform magnetic field before they meet Maxwell's equations in differential form. Beamline and vacuum-system teams estimate the force on a test charge in a known magnet and electrode geometry as a first pass before full particle-tracking simulation, using one uniform-field cell when the aperture is simple.
Plasma and magnetron models use the same identity at the single-particle level to explain E cross B drifts without standing up a fluid solver. Keep the scalar magnetic-only landing F equals q v B sin theta, the electric-only landing F equals qE, the wire-force landing I L B sin theta, and cyclotron-radius formulas on separate pages so each search intent has one clear result rather than an overloaded multi-formula tool that confuses both students and search engines.
What you can do with it
Homework and lab vector Lorentz drills
Compute F = q(E + v × B) for textbook charges and SI field vectors so teachers and auto-graders share one ground truth, including non-finite component errors.
First-pass beam, Hall, and plasma estimates
Estimate the newton force vector on a moving charge in uniform E and B before full particle-tracking, magnetron, or multiphysics simulation.
FAQ
What formula does this Lorentz force calculator use?
The vector identity F = q(E + v × B) with q in coulombs, v in m/s, E in V/m, B in tesla, and F in newtons. The response also reports qE and q(v × B) separately.
What happens if a component is not a finite number?
Every charge value and every velocity, electric-field, and magnetic-field component must be a finite number; NaN, Infinity, missing entries, and non-numeric text are rejected.
How is this different from F = qvB sinθ?
F = qvB sinθ is the magnitude of the magnetic term alone for a chosen angle. This calculator returns the full 3D force including the electric term qE and the directed magnetic term q(v × B).
What units should I use?
SI only: charge in coulombs, velocity in metres per second, electric field in volts per metre, magnetic field in tesla.
What does the Lorentz force calculator cost?
The browser tool is free and runs locally.
Related tools
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/phys/lorentz-force \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"charge":2,"velocity":[3,0,0],"electric_field":[0,4,0],"magnetic_field":[0,0,5]}'const res = await fetch("https://api.kit.forhosting.com/phys/lorentz-force", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"charge": 2,
"velocity": [
3,
0,
0
],
"electric_field": [
0,
4,
0
],
"magnetic_field": [
0,
0,
5
]
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/phys/lorentz-force",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"charge": 2,
"velocity": [
3,
0,
0
],
"electric_field": [
0,
4,
0
],
"magnetic_field": [
0,
0,
5
]
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/phys/lorentz-force", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"charge":2,"velocity":[3,0,0],"electric_field":[0,4,0],"magnetic_field":[0,0,5]}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"charge":2,"velocity":[3,0,0],"electric_field":[0,4,0],"magnetic_field":[0,0,5]}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/phys/lorentz-force", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"charge": 2,
"velocity": [
3,
0,
0
],
"electric_field": [
0,
4,
0
],
"magnetic_field": [
0,
0,
5
]
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "phys.lorentz_force",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Limits
max_abs_component | 1000000000000000 |
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
Any component that is missing, infinite, or not a finite number is rejected with invalid_input so a unit mix-up never silently becomes a wrong answer.
What you send and what you get back
Each vector must be an array of exactly three finite numbers. Numeric values and numeric strings are both accepted so form widgets and spreadsheet paste stay convenient; SI prefix strings such as one microcoulomb written as text are not parsed, so pass 1e-6 for a microcoulomb source. Charge, velocity, and both fields may be positive, negative, or zero; a resting charge in a zero electric field yields a zero force, which is the honest result. A classic classroom check is charge two coulombs, velocity three metres per second along x, electric field four volts per metre along y, and magnetic field five tesla along z, which yields force zero, minus twenty-two, zero newtons. Send a finite charge under the field charge in coulombs, a length-three velocity vector under velocity in metres per second, a length-three electric field under electric_field in volts per metre, and a length-three magnetic field under magnetic_field in tesla. Charge is also accepted as q, Q, or coulombs; velocity as v; electric_field as E or electric; magnetic_field as B or magnetic; only one key may appear for each quantity in a request. Missing fields, empty strings, NaN, Infinity, non-numeric text, and vectors that are not length three fail with invalid_input and are not charged. On success the response echoes the cleaned inputs, returns force as the primary newton vector, force_x, force_y, and force_z as the same Cartesian components, magnitude as the Euclidean length, electric_force as qE, magnetic_force as q times v cross B, unit set to N, formula F = q(E + v × B), and method lorentz_force. Pricing for successful API calls is the published base of $0.002 per item; validation failures do not consume prepaid balance.
Where a vector Lorentz force calculator shows up in real work
Instrumentation labs that place a known charge at a known velocity between calibrated plates and Helmholtz coils can call the API and assert that the expected newton vector matches a force-probe reading within tolerance. Because this capability is a pure parse engine, API pricing is the published base of $0.002 per successful item and failed validation does not consume balance.
Integration use cases
Answer keys and instrument fixture checks
Bulk-generate expected force components for known q, v, E, and B in contest fixtures, worksheets, and calibrated plate-and-coil tables.