# Magnetic Field Calculator

Calculate magnetic field around a straight wire using B = μ₀I/(2πr). Also computes Lorentz force on a moving charge.

## What this calculates

Every current-carrying wire creates a magnetic field around it. For a long straight wire, the field strength at distance r is given by B = μ₀I/(2πr), where μ₀ = 4π × 10⁻⁷ T·m/A is the permeability of free space. This calculator also computes the Lorentz force on a charged particle moving through the field.

## Inputs

- **Current (I)** (A) — min 0
- **Distance from Wire (r)** (m) — min 0
- **Charge Velocity (optional)** (m/s) — min 0 — Enter velocity of a moving charge in the field
- **Charge (optional)** (C)

## Outputs

- **Magnetic Field (B)** (T) — B = μ₀I/(2πr)
- **Magnetic Field** (G) — Magnetic field in Gauss (1 T = 10,000 G)
- **Lorentz Force on Charge** (N) — F = qvB (perpendicular velocity assumed)

## Frequently Asked Questions

**Q: What creates a magnetic field?**

A: Moving electric charges create magnetic fields. In a wire, the flowing current (moving electrons) generates a circular magnetic field around the wire. The direction follows the right-hand rule: if your thumb points along the current, your fingers curl in the direction of the magnetic field lines.

**Q: What is the difference between Tesla and Gauss?**

A: Both are units of magnetic field strength. Tesla (T) is the SI unit and Gauss (G) is the CGS unit. 1 Tesla = 10,000 Gauss. Earth's magnetic field is about 25–65 μT (0.25–0.65 G). An MRI machine uses 1.5–3 T. A neodymium magnet produces about 1.2–1.4 T at its surface.

**Q: What is the Lorentz force?**

A: The Lorentz force F = qv × B is the force on a charged particle moving through a magnetic field. The force is always perpendicular to both the velocity and the magnetic field, which causes the particle to move in a circular path. This principle is used in particle accelerators, mass spectrometers, and CRT displays.

**Q: How does distance affect the magnetic field from a wire?**

A: The magnetic field from a long straight wire decreases as 1/r (inversely with distance), not 1/r² like electric and gravitational fields. This means doubling the distance halves the field strength. This slower falloff is because the wire is an extended source, not a point source.

---

Source: https://vastcalc.com/calculators/physics/magnetic-field
Category: Physics
Last updated: 2026-04-21
