Coulomb's Law | Engineering Calculator API

Posted on March 1, 2026 by Boden Bensema

Coulomb's Law API

Formula

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

where

k=14πε0εr=KEεrk = \frac{1}{4 \pi \varepsilon_0 \varepsilon_r} = \frac{K_E}{\varepsilon_r}

Description

This endpoint computes values using Coulomb's Law for the electrostatic force between two charges. The API can solve for any unknown variable given sufficient inputs and supports both single-distance and multi-distance comparisons.

It supports:

  • Solving for FF, q1q_1, q2q_2, q1q2q_1 \cdot q_2, or rr
  • Comparing forces at two distances rir_i and rfr_f
  • Custom dielectric media using εr\varepsilon_r
  • Signed forces (repulsive ++, attractive -)

Parameters

NameTypeRequiredDescription
FfloatoptionalElectrostatic force in newtons
q1floatoptionalFirst charge in coulombs
q2floatoptionalSecond charge in coulombs
q_productfloatoptionalProduct q1q2q_1 q_2 in C2C^2
rfloatoptionalSeparation distance in meters
r_ifloatoptionalInitial distance for comparison
r_ffloatoptionalFinal distance for comparison
epsilon_rfloatoptionalRelative permittivity (default = 1.0)
kfloatoptionalCoulomb constant override
signedbooloptionalWhether to include force sign

Behavior

  • If both q1 and q2 are provided, q_product is computed automatically.
  • If q_product and one charge are provided, the other charge is derived.
  • If both r_i and r_f are provided, the API returns forces at both distances along with change and ratio.
  • If solving for a single unknown, all other required values must be provided.
  • If all values are provided, the API verifies consistency.

Derived Quantities

When sufficient data is available, the API also computes:

  • Electric potential energy
    U=kq1q2rU = k \cdot \frac{q_1 q_2}{r}

  • Electric field from each charge
    E=kqr2E = k \cdot \frac{|q|}{r^2}

Example Summary Output

  • Solving for force:
    F=kq1q2r2F = k \cdot \frac{q_1 q_2}{r^2}

  • Solving for distance:
    r=kq1q2Fr = \sqrt{\frac{k |q_1 q_2|}{|F|}}

  • Multi-distance comparison:
    F(ri)F(rf)F(r_i) \rightarrow F(r_f) with change ΔF\Delta F and ratio

Notes

  • r0r \neq 0
  • F0F \neq 0 when solving for rr
  • Sign of force depends on charge polarity when signed=true

About the Author

This article was written by Boden Bensema, an electronics hobbyist focused on teaching beginner-friendly circuit design, breadboarding, and electronics fundamentals.

About page