Voltage, also referred to as electrical potential difference, or an electric tension, is the electric potential difference between two points, or the difference in electric potential energy of a unit test charge transported between two points. It is measured in units of electric potential, volts or joules per coulomb. Voltage is equal to the work done per unit charge against a static electric field to move the charge between two points.
A voltage can represent either a source of energy, lost, used or stored energy. A voltmeter is used to measure the voltage between two points in a system. Voltage can be caused by static electric fields by electric current through a magnetic field, by time-varying magnetic fields, or some combination of these.
Similar to mechanical potential energy, the zero of potential can be chosen at any point so the difference in voltage is the quantity which is meaningful. The difference in voltage measured when moving across point A to point B is equal to the work which would have to be done, per unit charge, against the electric field to move the charge from A to B. This voltage between the two ends of the path is the total energy required to move an electric charge along the path divided by the magnitude of the charge. This relationship can be mathematically modeled as the line integral of the electric field and the time rate of change of magnetic field along that path.
Voltage is defined so that negatively charged objects are pulled towards higher voltages, while positively charged objects pull towards lower voltages. This follows the principle that opposites attract. The conventional current in a wire or resistor always flows from higher voltage to lower voltage. It is possible for current to flow from lower voltage to higher voltage, but only when a source of energy is present to push it against the opposing electric field.