Electric Field Calculator for Two Point Charges

Introduction to the two-charge electric-field simulator

This two-charge electric-field calculator turns a standard electrostatics problem into a visual experiment. You place two fixed point charges in a two-dimensional plane, choose the starting position and physical properties of a test charge, and follow the test charge as the combined electric force changes its motion. The field sketch, trajectory, numerical summary, and energy indicators update together, making it easier to connect Coulomb’s law with the path shown on the screen.

The calculator is especially useful when signs and directions are easy to confuse. A positive source produces a field pointing away from it, while a negative source produces a field pointing toward it. At every test position, the two vector contributions are added. The resulting direction may be horizontal in a symmetric arrangement, diagonal in an offset arrangement, or close to zero where competing contributions balance.

All inputs use SI units. Enter charge in coulombs, position in meters, mass in kilograms, and time in seconds. A consistent unit system matters because Coulomb’s constant is expressed in SI units and the numerical trajectory assumes those units throughout the calculation.

What this two-point-charge calculation reveals

The two-point-charge calculation answers more than “What is the field at one point?” It also estimates how a test particle responds over time. The electric field depends on the fixed source charges and their geometry. Force then depends on the test charge, while acceleration depends on both force and mass. This distinction explains why two particles can occupy the same field yet move in opposite directions or accelerate at very different rates.

A positive test charge accelerates in the electric-field direction. A negative test charge accelerates against it. Increasing the magnitude of the test charge increases force, while increasing mass reduces acceleration. Changing source-to-test distance has a particularly strong effect because the field of an ideal point charge follows an inverse-square relationship.

How to use the electric-field trajectory controls

To use the electric-field trajectory controls, begin with the prefilled dipole-like arrangement and press Play. The red and blue source markers identify the fixed charges, the small green marker shows the moving test charge, and the green curve records its trajectory. Pause preserves the current run. Reset returns the particle to its starting coordinates and rebuilds the simulation from the current inputs. CSV downloads sampled time, position, velocity, kinetic-energy, and potential-energy values.

  1. Enter pₓ and pᵧ, the initial x- and y-coordinates of the moving test charge in meters.
  2. Enter q₁, x₁, and y₁ for the first fixed source charge.
  3. Enter q₂, x₂, and y₂ for the second fixed source charge.
  4. Set Test q to the moving particle’s charge and m to its mass.
  5. Choose numerical step Δt and total duration T, then play the simulation.

Change one variable at a time when investigating a result. For example, move one source, restore it, reverse its sign, and only then alter the test particle. This method makes the physical cause of each trajectory change easier to recognize.

Inputs for a stable two-charge field run

The coordinates define the geometry, so they deserve as much attention as charge magnitude. A source very close to the test particle produces an intense field and rapidly changing acceleration. That behavior can be meaningful within the idealized model, but it also demands a small time step. Do not place the test particle exactly on a source because an ideal point charge has a singular field at zero separation.

The source values q₁ and q₂ may be positive or negative. Their signs determine field direction, while their magnitudes scale field strength. The test-charge sign does not change the electric field itself; it changes the force experienced by the moving particle. Likewise, mass does not change the field or electric force, but it changes acceleration through Newton’s second law.

The time step Δt controls numerical integration resolution. A smaller value means more calculations and usually less numerical energy drift. Duration T controls how long the trajectory is followed. If a particle accelerates rapidly, a short duration may be more informative than a long run in which it immediately leaves the visible plane.

Formulas for the electric field, force, motion, and energy

The electric-field formulas begin with Coulomb’s vector law. For source charge qᵢ, the field at a point separated by displacement vector rᵢ is:

Ei = k qiri ri3

The total field is the vector sum of both contributions. Coulomb’s constant is approximately 8.9875517923 × 10⁹ N·m²/C². Once the total field is known, the force and acceleration of the test particle follow from:

F=qtE , a=Fm

The simulator advances that acceleration with a fourth-order Runge–Kutta method. It also evaluates kinetic and electric potential energy. For two fixed sources, the test charge’s potential energy is:

U = k qt ( q1 r1 + q2 r2 )

Kinetic energy is one half of mass times speed squared. In this ideal conservative model, kinetic plus potential energy should remain approximately constant. The energy-drift indicator therefore serves as a numerical quality check rather than representing an additional physical force.

Worked example: a symmetric positive–negative charge pair

This worked example uses the default arrangement: q₁ = +1 × 10⁻⁶ C at x = −0.5 m and q₂ = −1 × 10⁻⁶ C at x = +0.5 m. Both sources lie on y = 0, and the positive test charge begins at the origin. At the center, the positive source’s field points right because it points away from positive charge. The negative source’s field also points right because it points toward negative charge. The contributions reinforce each other rather than canceling.

Each source is 0.5 m from the origin. The magnitude contributed by either source is approximately k × 10⁻⁶ ÷ 0.5², or about 35,950 N/C. Both contributions point right, so the initial total field is about 71,900 N/C. A +1 × 10⁻⁹ C test charge initially experiences a force near 7.19 × 10⁻⁵ N. With the default mass of 1 × 10⁻⁶ kg, its initial acceleration is about 71.9 m/s² toward the negative source.

This example provides a useful sign check. Reversing the test-charge sign should reverse acceleration without changing the field arrows. Reversing both source signs should reverse the field. Making both sources equal and positive should instead create a zero-field point at the exact midpoint, although that equilibrium is not stable in every direction.

Sensitivity of the electric field to distance and polarity

Electric-field sensitivity is often dominated by distance. Halving separation from one source increases that source’s field magnitude by a factor of four. Doubling a source charge doubles its contribution. Reversing its sign leaves magnitude unchanged but rotates that contribution by 180°. Because the calculator adds vectors, these simple individual changes can produce a complicated combined response.

Near a source, even a modest coordinate change can dramatically alter the trajectory. Far from both sources, the arrangement may behave approximately like one net charge when q₁ + q₂ is not zero, or like an electric dipole when net charge is zero. The field display and exported trajectory help compare these regimes.

How to interpret the electric-field result

To interpret the electric-field result, read the displayed elapsed time, current position, and speed as the state of this numerical simulation at that instant, not as a universal final answer. The path is determined by initial position, zero initial velocity, fixed source charges, test charge, mass, step size, and duration.

The kinetic- and potential-energy bars use normalized scales so changes are easy to notice, while their text values are reported in joules. Small drift is reassuring. Large or rapidly growing drift suggests that Δt is too large, the particle has approached a source too closely, or the idealized force has become too intense for the selected settings. Reducing Δt and shortening T are sensible first responses.

Limitations of this two-dimensional point-charge model

The limitations of this point-charge model arise from its deliberate simplifications. It treats source charges as ideal points fixed in place and ignores magnetic effects, radiation, relativity, collisions, finite particle size, dielectric materials, conducting boundaries, gravity, and back-reaction of the test charge on the sources. Motion is confined to a two-dimensional plane even though Coulomb’s inverse-square law is used.

The model starts the test particle from rest and numerically approximates continuous motion. It is best suited to teaching, qualitative exploration, and quick consistency checks. Real electrostatic devices may require three-dimensional boundary conditions and finite-element or boundary-element analysis. Do not rely on this page alone for high-voltage safety, medical equipment, precision engineering, or regulatory decisions.

Electric-field results will appear here after you start the simulation.
Your browser does not support the electric-field trajectory canvas.
Field vectors from two point charges with the moving test-charge trajectory in the x–y plane.

Kinetic energy of the test charge

0.000 J

Potential energy in the two-charge field

Waiting for simulation data.

Energy drift in this run

Waiting for simulation data.

The simulation is ready at time zero.
Electric-field summary will appear here.

Input adjustment notices will be announced here.

Mini-game: Vector Vault field matching

Practice the same superposition principle used by the calculator. Move the cyan probe through the field created by the source charges. Match both the target field strength and target direction, then lock the reading. A green gauge means you are close. Correct locks build a streak, while rushed locks cost time. The run lasts 75 seconds, with a third source and polarity inversion introduced as the round develops.

Score0 Time75 Streak0 Progress0/12
Move the probe to match electric-field strength and direction.

Vector Vault Mission

Move the probe with your pointer or arrow keys. Match the target N/C strength and arrow direction, then click, tap, press Space, or use Lock vector. Score as many clean readings as possible in 75 seconds.

Best score: 0

Ready to calibrate the field probe.

Educational takeaway: electric fields add as vectors. Matching magnitude alone is not enough; the x- and y-components from every charge determine the resultant direction.

Checklist for a trustworthy electric-field run

  • Positions, charges, mass, and time use consistent SI units.
  • Energy drift remains small for the selected Δt.
  • Charge signs bend the trajectory in the expected direction.
  • The test charge does not begin exactly on a source charge.
  • The trajectory remains stable over the selected duration T.

Embed this calculator

Copy and paste the HTML below to add the Electric Field Calculator for Two Point Charges to your website.