Home / Science / Physics / Electromagnetism / 2D electrostatics solverTool #915

2D electrostatics solver: draw electrodes, solve Laplace's equation, see potential, field and capacitance

Type or draw electrodes at any voltages inside a box, and the page solves Laplace's equation on a grid by over-relaxation. See the potential map, equipotentials and field arrows, probe any point, and get the charge on each electrode and the capacitance per metre.

Keep it one tap away for everyday use.

Bookmark 2D electrostatics solver?

Press Ctrl + D now. Your browser opens its own bookmark box, where you choose the name and folder.

  1. Electrodes
  2. Solve
  3. Field map
  4. Probe
Nothing is uploadedWorks offline once open

Electrodes

Draw on the picture

Draw paints electrodes at the brush voltage; Erase removes electrode (including typed shapes) under the brush; Probe reads the potential and field. The solver holds every electrode at its voltage and finds the potential everywhere else (Laplace's equation, empty space between the electrodes). Each shape runs on unchanged into and out of the screen, so capacitance is per metre of that length.

low potentialmiddlehigh potentialblack: electrodes; lines: equipotentials; arrows: field direction

Charge on each electrode

Charges come from Gauss's law on the grid; curved electrodes become staircases of grid points, so expect results within a few per cent of exact formulas, closer on a finer grid. With open edges the far field is cut off at the box, so results are only rough unless the electrodes are small next to the box. Empty space only (εr = 1); for a uniform dielectric everywhere, multiply capacitance and charge by εr.

Download

What it does

Between conductors held at fixed voltages, the potential in empty space obeys Laplace’s equation: every point sits at the average of its surroundings. For a few simple shapes there are formulas, but for real layouts (a wire near a corner, plates with edges, several electrodes) the answer has to be found numerically. This solver does that on a square grid in your browser:

  1. Electrodes are held at their voltages; the outer edge is either a grounded metal box or open (no field crosses it).
  2. Every other grid point is repeatedly replaced by the average of its four neighbours, over-relaxed so that it converges in a few hundred sweeps.
  3. From the potential it draws a colour map, equipotential lines and field arrows, and works out the field at any point, the charge on each electrode (from Gauss’s law on the grid), the field energy, and, when there are just two voltages, the capacitance per metre.

The problem is two-dimensional: every shape runs on unchanged into and out of the screen, like a long cable or a pair of long plates.

How to use it

  1. Pick a starting example, or type shapes, one per line, in cm from the centre: circle x y r V, ring x y r V (a thin round shell), rect x1 y1 x2 y2 V or line x1 y1 x2 y2 V.
  2. Or choose Draw, set the brush voltage and radius, and paint electrodes on the picture with your finger or mouse. Erase removes electrode under the brush (typed shapes too). Clear drawing removes what you painted.
  3. Choose the box size, the grid (finer is more accurate but slower) and what the box edges do.
  4. Switch back to Probe and tap anywhere to read the potential and field there.
  5. Download the potential grid as CSV, or the report as an image, PDF or Word file.

Worked example

The first example is a made-up coaxial cable: a 1 cm radius wire at 100 V inside a 4 cm radius shell at 0 V, on the 121 × 121 grid. The exact capacitance is 2πε₀/ln(4) = 40.13 pF per metre; the page shows C = 39.19 pF per metre, 2.3 % low, because the round shapes become staircases of grid points (the wire is 0.833 mm grid steps across). The charge is ±3.919 nC per metre and the field energy 194.3 nJ per metre. The probe, 2.5 cm from the centre, reads 32.58 V and 2.82 kV/m, against the exact 33.9 V and 2.89 kV/m. Choose the 161 grid and the capacitance rises to 39.54 pF per metre, closer to the exact value.

Tips

  • Sharp corners and thin edges concentrate the field: the “strongest field” fact shows where breakdown would start.
  • With open edges, keep the electrodes well inside the box; the field that would spread to infinity is cut off at the edge.
  • A grounded box around everything is how real shielded cables and enclosures behave, and it makes the result exact for that geometry.

FAQ

Can it include a dielectric? Not region by region. If the whole space is filled with one material, multiply the capacitance and charges by its εr.

Why is there a charge on the box? In a grounded box, every field line that leaves an electrode ends somewhere; lines that do not end on another electrode end on the box, which then carries the balancing charge.

Is anything uploaded? No. The solver runs in your browser.

Where the numbers come from

  • Laplace's equation solved by finite differences with successive over-relaxation (optimal factor 2/(1 + sin(π/(n − 1)))): standard numerical method, for example Press et al., Numerical Recipes, section 19.5, and Sadiku, M. N. O., Numerical Techniques in Electromagnetics.
  • Charge from the discrete form of Gauss's law and capacitance from the field energy 2W/V²; coaxial capacitance 2πε₀/ln(b/a) for comparison: standard results.
  • ε₀ = 8.8541878188 × 10⁻¹² F/m (CODATA 2022).
  • Checked against a direct sparse solution of the same grid (SciPy spsolve), the same discrete Gauss sum, and the exact coaxial capacitance, written for the tests. The example electrodes are made up.

Standard scientific values, such as constants, atomic weights and melting points, are facts found in every textbook; we name where ours were checked. If you are an author or publisher and want a value, a credit or a table changed or removed, tell us and we will act quickly.

Last updated 2026-11-09.

Related tools

Electric field line plotter #909 Place point charges, line charges and dipoles, drag them around, and watch the field lines and equipotentials redraw. Tap anywhere to read the field strength, direction and potential there, and see the force on every charge. Capacitor and inductor calculator #911 Work out the capacitance or inductance of parallel plates (with one or two dielectric layers), coaxial cable, spheres, twin wires, a wire over a ground plane, solenoids and toroids. Get the charge, stored energy, fields, characteristic impedance and signal speed too. Publication plot maker #27 Paste columns or open a CSV or Excel file and get a clean scientific figure with error bars, sized for a journal column. Download vector SVG or PDF, or PNG at 300 or 600 dpi. Your data stays in your browser. Coil field designer #910 Design Helmholtz, Maxwell, anti-Helmholtz or your own set of round coils. Get the exact field at the centre, how long and how wide the uniform region is, a map of the uniformity, the current for a target field, and the wire length, resistance and heat. Skin depth calculator #912 Find how deep alternating current gets into a conductor at any frequency, and what that does to the resistance of a round wire (exact Bessel-function solution), a sheet or shield, and the conductor loss of a coax line. Rounded resistivities for common metals, all editable. Waveguide mode calculator #913 Give a rectangular or circular waveguide's size and filling to get the cutoff frequency of every TE and TM mode, the single-mode band, and at your frequency which modes propagate, the guide wavelength, phase and group speed, wave impedance and wall loss.