Electromagnetism  ·  25 April 2026↻ Updated 26 Aug 2026

Coulomb's Law Calculator — Electric Force Between Charges

Coulomb's Law describes the force between two point charges. Published by Charles-Augustin de Coulomb in 1785, it is the electrostatic analogue of Newton's Law of Gravitation — both forces follow an inverse-square relationship with distance. Coulomb's Law is the foundation of electrostatics, and from it we can derive electric fields, potential, and eventually Maxwell's equations.

Two simulators on this page do the arguing for it. In the first, the separation between two charges is something you drag with a finger, and a live dot rides the force curve while you do — the 1/r² stops being an exponent and starts being a shape. In the second, two charged balls hang from the same pivot and swing out until their repulsion is balanced by gravity, which is the classic exam problem you can grab and pull sideways.

What Is the Formula for Coulomb's Law?

F=kq1q2r2F = k \frac{q_1 q_2}{r^2}

SymbolQuantityValue/Unit
FElectrostatic forceN (positive = repulsion, negative = attraction)
kCoulomb's constant8.99 × 10⁹ N·m²/C²
q₁, q₂ChargesCoulombs (C)
rDistance between chargesm

In SI units, k=14πε0k = \dfrac{1}{4\pi\varepsilon_0} where ε0=8.85×1012\varepsilon_0 = 8.85 \times 10^{-12} C²/N·m² is the permittivity of free space.

Sign rule: Like charges (both positive or both negative) → F > 0 → repulsion. Opposite charges → F < 0 → attraction.

The force is one view of the interaction; energy is the other. Move a charge through a field and the same 1/r21/r^2 law integrates to a 1/r1/r potential — which is why the electric potential calculator can answer "how much work?" with a subtraction, while a force calculation needs directions and vector components. Same physics, two accounting systems.

How Does Electric Force Change with Distance?

Why the square? Picture the influence of a point charge as something that spreads outward evenly in every direction. Whatever total amount leaves the charge has to cross every imaginary sphere drawn around it, and the area of a sphere is 4πr24\pi r^2. Double the radius and that same total is smeared over four times the area, so the strength at any one spot drops to a quarter. Nothing about electricity is special here — light from a bare bulb and gravity from a planet thin out for exactly the same geometric reason.

Then there is the trap that costs marks every year: the belief that the bigger charge pushes harder. It doesn't. There is one force in F=kq1q2/r2F = kq_1q_2/r^2, and q1q2q_1q_2 is a product that couldn't care less which factor is larger. A 10 μC charge next to a 1 μC charge feels precisely what the 1 μC charge feels, in the opposite direction — Newton's third law, arriving out of the algebra rather than being bolted on afterwards. The bench below draws both arrows from that single number, so no amount of slider-dragging can make one longer than the other.

Try it yourself

  1. Drag either charge along the rail and watch the hollow ghost dot beside the live one. At 50 cm or less it marks ×¼ at double the distance; past 50 cm it flips to ×4 at half the distance, because double has run off the end of the rail. Either way the two heights stay in a 4:1 ratio wherever you stop.
  2. Set q₁ to +10 μC and q₂ to +1 μC. The banner says one charge is 10× the other; the two arrows on the rail stay exactly the same length. Try any ratio the sliders allow — they never split.
  3. Flip the sign of q₂ back to negative. The arrows swing round to point inward at each other, the accent turns amber, and the banner switches from repulsion to attraction — the magnitude never noticed.
  4. Slide either charge to 0 μC. The force vanishes for both, the arrows disappear, and the curve pane says so out loud.
F = k q₁q₂ / r² = 599.333 mN — attraction
Move them to 60.0 cm — double where they are now — and the force falls to 149.833 mN, a quarter of this one.
q₂ is 1.5× q₁, yet both arrows are the same length — each charge feels exactly the same force.
Two point charges in vacuum, and the force is the exact F = kq1q2/r2 everywhere — there is no softening term, because the rail simply refuses to bring the centres closer than 5 cm. Arrow lengths are compressed logarithmically between 1 mN and 400 N so that a milli-newton and a few hundred newtons are both drawable, and they are shortened further if the pair is parked against an end of the rail; read the banner for the force, never the pixels. Attraction is drawn with the arrowheads landing on the charges from outside, so the pair never has its arrows squeezed out at exactly the separation where the force is strongest. The curve’s vertical axis auto-scales in 1–2–5 steps to whichever of the two dots is higher, so the 1/r2 spike near 5 cm runs off the top of the pane instead of pressing every other separation flat onto the axis — the tick labels always say what the top of the axis is currently worth.
The two charges
2 μC
-3 μC
Opposite signs attract, like signs repel, and either way the two arrows on the rail come out the same length. Set one to zero and the force vanishes for both.
Separation
Drag either charge along the rail. The live dot slides along the curve underneath, and the hollow ghost dot beside it always sits at double the separation — or at half of it, once double runs off the end of the rail. Its height is a quarter of the live dot’s, or four times it, wherever you stop.

The default pair (+2 μC and −3 μC, 30 cm apart) sits at 599.333 mN of attraction. Drag them to 60 cm and the reading falls to 149.833 mN — one quarter, to the digit, for twice the distance. That factor is the whole content of the inverse square, and it holds at every separation the rail allows, which is a far more convincing demonstration than any single worked number.

Why Do Two Charged Balls Hang Apart? The Pendulum Equilibrium

Hang two pith balls from the same point on identical threads, touch them both with a charged rod, and they spring apart and stop — not at zero, not at ninety degrees, but at some particular angle they find on their own and hold. That angle is the answer to a three-way argument. The string can only pull along its own length. Gravity pulls straight down. The repulsion pushes each ball away from the other, roughly horizontally. Equilibrium is the pose where those three cancel.

Resolve the forces on one ball and the strings drop out of the problem entirely. Horizontally, the string's tension has to supply Tsinθ=FeT\sin\theta = F_e; vertically, it has to hold up the weight, Tcosθ=mgT\cos\theta = mg. Divide one by the other and the tension — the one force nobody knows — cancels:

tanθ=Femg\tan\theta = \frac{F_e}{mg}

That is the whole result. The angle measures the repulsion against the weight, and nothing else.

Try it yourself

  1. Watch first without touching anything. Both balls settle at 9.5° each — nobody typed that angle in. If your device is set to reduce motion, the scene simply starts there already at rest; otherwise you get to watch them find it: half a degree off vertical, springing apart, overshooting, and ringing down.
  2. Grab a ball, pull it well out to one side, and hold it there. The other ball doesn’t wait: it re-balances against wherever your finger is. Let go and both ring down together.
  3. Leave the masses equal and set q₁ = 400 nC against q₂ = 100 nC. Four to one, and the two angles stay identical — one force acts on both balls.
  4. Now put m₁ at 4 g and leave m₂ at 2 g. The angles split immediately, and the banner quotes tan θ₁/tan θ₂ = m₂/m₁ beside the measured ratio.
  5. Switch the free-body view to Show force triangle and pull a ball again. The three vectors laid head to tail leave a gap while the pair is swinging; the gap closes to nothing as the motion dies away.
θ₁ = 0.5° · θ₂ = 0.5° · d = 0.9 cm · Fe = 224.750 mN on each ball
Swinging. The forces do not cancel yet, so there is a net force left over and the balls are still moving.
Both strings are massless and inextensible, tied to the same point, and the balls are treated as point charges sitting at their centres — they are drawn far larger than their real size so that a finger can catch one. Each ball is held on its circle at all times, which a string only manages while it is taut: wind both charges up and pull a ball across onto its partner, and the kick can carry it right over the pivot in a way no real string would allow. Nothing stops the two balls passing through each other either — they have no collision geometry, and the 2 cm contact floor caps how large the repulsion may grow, not how close the centres may get — so a hard enough drag will swap which ball is on which side. Air resistance is modelled as a simple angular damping term proportional to angular speed, which is what makes the swing die away; it is not one of the three forces the triangle draws, so the resultant arrow is what tension, weight and repulsion leave over. Only repulsion is offered, and the charges are magnitudes: two opposite charges have no hanging equilibrium at all — they swing toward each other and keep going until they touch, which is a collision, not a balance. The textbook tan θ = Fe/mg assumes the line joining the two balls is horizontal, which is exactly true only when they hang at the same angle. The scene integrates the real two-dimensional motion instead, so once the masses differ the settled angles sit a few tenths of a degree away from the equilibrium ticks the formula predicts at everyday settings, growing to fifteen degrees or so at the largest charges on the shortest strings with the most lopsided masses.
Charges (magnitudes)
100 nC
100 nC
Both balls are positive, so they only ever push apart. Give them opposite signs in real life and there is no angle to find: they swing together and collide.
Masses
2 g
2 g
Split the masses and the balls stop hanging symmetrically: tan θ₁/tan θ₂ = m₂/m₁, because the same force is being weighed against two different weights.
String length
0.50 m
Free-body view
Drawn on the left ball. Tension runs up the string, the weight straight down, the repulsion along the line joining the two centres.
Puts both balls back half a degree from vertical with everything at its default, and lets them find 9.52° on their own.

The Math Behind the Equilibrium Angle

The formula above is not quite a solution, because FeF_e depends on the separation dd, and dd depends on the very angles you are solving for. With both threads of length LL tied to a common pivot, the balls hang at horizontal distances Lsinθ1L\sin\theta_1 and Lsinθ2L\sin\theta_2 on opposite sides, so

d=L(sinθ1+sinθ2)tanθi=FemigFe=kq1q2d2d = L(\sin\theta_1 + \sin\theta_2) \qquad \tan\theta_i = \frac{F_e}{m_i g} \qquad F_e = \frac{kq_1q_2}{d^2}

For identical balls, θ1=θ2=θ\theta_1 = \theta_2 = \theta and this collapses to the familiar d=2Lsinθd = 2L\sin\theta with tanθ=kq2/(d2mg)\tan\theta = kq^2/(d^2mg) — one equation in one unknown, though a transcendental one that has to be solved numerically rather than rearranged.

One honest caveat about that tanθi\tan\theta_i line: it assumes the line joining the two balls is horizontal, so that the repulsion has no vertical component. That is exactly true when the balls hang at the same angle, and only then. Give them different masses and the heavier ball hangs steeper, the connecting line tilts, and the textbook prediction drifts — by a few tenths of a degree at charges like these, growing to fifteen degrees or so once the charges are large, the strings short, and the masses far apart. The simulation integrates the real two-dimensional motion, so its equilibrium ticks — drawn from the formula — mark where the balls end up almost landing; the gap is the formula's, not the simulation's.

Worked Examples for Physics Exams

Worked Example

Example 1 — Two protons

Two protons are separated by 1 nm (10⁻⁹ m). Each proton carries charge q = +1.6 × 10⁻¹⁹ C. What is the electrostatic repulsion between them?

F=kq2r2=8.99×109×(1.6×1019)2(109)2F = k\frac{q^2}{r^2} = \frac{8.99 \times 10^9 \times (1.6 \times 10^{-19})^2}{(10^{-9})^2}

F=8.99×109×2.56×103810182.3×1010 NF = \frac{8.99 \times 10^9 \times 2.56 \times 10^{-38}}{10^{-18}} \approx 2.3 \times 10^{-10} \text{ N}

That's 0.23 nN — tiny in everyday terms, but enormous relative to the proton's mass (1.67 × 10⁻²⁷ kg). This is why protons in a nucleus need the strong nuclear force to hold them together against electrostatic repulsion.

Worked Example

Example 2 — Comparing gravity and electrostatics

Compare the gravitational and electrostatic forces between two electrons separated by 1 mm.

Electron charge: q = −1.6 × 10⁻¹⁹ C, mass: m = 9.11 × 10⁻³¹ kg

Electrostatic: FE=kq2/r2=8.99×109×(1.6×1019)2/(103)22.3×1022F_E = k q^2 / r^2 = 8.99 \times 10^9 \times (1.6 \times 10^{-19})^2 / (10^{-3})^2 \approx 2.3 \times 10^{-22} N

Gravitational: FG=Gm2/r2=6.67×1011×(9.11×1031)2/(103)25.5×1065F_G = G m^2 / r^2 = 6.67 \times 10^{-11} \times (9.11 \times 10^{-31})^2 / (10^{-3})^2 \approx 5.5 \times 10^{-65} N

The electrostatic force is about 10⁴² times stronger than gravity between electrons. Gravity is utterly negligible at the subatomic scale.

Worked Example

Example 3 — Finding the charge on two hanging balls

Two identical balls of mass m = 2 g hang from the same point on L = 0.5 m threads. They carry equal charges and come to rest with each thread 10° from the vertical. Find the charge on each ball. (Take g = 9.8 m/s².)

Step 1 — the separation. Each ball sits Lsin10°L\sin 10° from the vertical, on opposite sides:

d=2Lsin10°=(1.000 m)(0.1736)=0.1736 md = 2L\sin 10° = (1.000 \text{ m})(0.1736) = 0.1736 \text{ m}

Step 2 — the force, from the angle alone. With equal masses the balls hang level, so the repulsion is horizontal and tanθ=Fe/mg\tan\theta = F_e/mg applies exactly:

Fe=mgtan10°=(0.002)(9.8)(0.1763)=3.456×103 NF_e = mg\tan 10° = (0.002)(9.8)(0.1763) = 3.456 \times 10^{-3} \text{ N}

Step 3 — the charge, from Coulomb's Law. Both charges are equal, so Fe=kq2/d2F_e = kq^2/d^2:

q=Fed2k=(3.456×103)(0.1736)28.99×109=1.077×107 Cq = \sqrt{\frac{F_e d^2}{k}} = \sqrt{\frac{(3.456 \times 10^{-3})(0.1736)^2}{8.99 \times 10^9}} = 1.077 \times 10^{-7} \text{ C}

So q ≈ 108 nC on each ball. Notice how little charge that is — a tenth of a microcoulomb, spread over two objects light enough to be lifted by a breath, is enough to hold them 17 cm apart against gravity.

Set both charge sliders in the simulator above to 110 nC — the nearest step they offer — with 2 g balls on 0.5 m threads: the pair settles at 10.1°, the balls 17.6 cm apart, a tenth of a degree from the exam answer.

Frequently Asked Questions

Explore more simulations

Every concept on PhysicStuff has an interactive simulation. No login, no setup required.