Physics

Coulomb's Law Calculator

Electrostatic force between two point charges at any separation, with a force-vs-distance plot.

Real Larzscript running in your browser74 automated checksOpen source · MITNo sign-up · your inputs never leave your device

Coulomb's law

Force (signed)
—

Force against distance

At your charges. The dot is your distance.

Show the Larzscript program that just ran
Run a calculation to see the exact program.

This is the real program the page sent to the Larzscript interpreter (compiled to WebAssembly) in your browser. The library it imports is the same code the automated tests check.

The formula

F = kₓ q1 q2 / r²    kₓ = 1 / (4πε₀) ≈ 8.9875517923×10⁹ N·m²/C²

Positive force means repulsion, negative means attraction. Charges are in coulombs; a microcoulomb (µC) is 10⁻⁶ C, a nanocoulomb (nC) is 10⁻⁹ C.

Worked example, computed above

Two 1 µC charges 0.1 m apart: 0.8988 N (repulsive, since both are positive).

What is verified

The inverse-square relationship is checked directly (doubling r exactly quarters the force), and distance round-trips back out of a computed force — see tests/test_emwaves.lz.

Frequently asked questions

What is Coulomb's law?

F = kₑq₁q₂/r² — the force between two point charges, where kₑ ≈ 8.988×10⁹ N·m²/C² (derived here from the SI-2019 exact vacuum permittivity, not a rounded constant). Two 1 microcoulomb charges 0.1 m apart repel with 0.8988 N.

Why does the force drop off so fast with distance?

It is an inverse-square law, the same shape as gravity: doubling the distance from 0.1 m to 0.2 m cuts the force to 0.25× — a quarter — not a half.

What does a negative result mean?

A negative product q1×q2 (opposite signs) gives an attractive force; a positive product (same sign, both positive or both negative) gives a repulsive one. The number returned is signed force along the line joining the charges.

How is the Coulomb constant derived here?

As kₑ = 1/(4πε₀), from the CODATA vacuum electric permittivity ε₀ in the physconst package — the same constant the whole science-calculator cluster uses, so results stay consistent across pages.

Every number on this page is computed by the open-source larzscript-physics library (emwaves, physconst, physmath), written in Larzscript, and checked against independent references in its test suite. How it is verified →