Electric potential energy, or electrostatic potential energy, is a potential energy (measured in joules) that results from conservative Coulomb forces and is associated with the configuration of a particular set of point charges within a defined system. Not to be confused with the term electric potential (measured in volts), the term "electric potential energy" is used to describe the potential energy in systems with electric fields that change with time (time variant), while the term "electrostatic potential energy" is used to describe the potential energy in systems with electric fields that do not change with time (time invariant).
The reference zero is usually taken to be a state in which the individual point (test) charges are very well separated ("are at infinite separation") and are at rest.
For one point charge q in the presence of an electric field E due to another point charge Q, the electric potential energy is defined as the negative of the work done to bring it from the reference position rref to some position r: mathematically this is a line integral. The field is conservative, and, for one point charge, radial, so it is path independent and equal to the difference in potential between the two endpoints the charge has moved. Mathematically: