The meaning of work in thermodynamics, and how to calculate work done by the compression or expansion of a gas.

Key Points:

  • Work is the energy required to move something against a force.
  • The energy of a system can change due to work and other forms of energy transfer such as heat.
  • Gases do expansion or compression work following the equation:
    work=PΔV\text {work} = -\text P\Delta \text V

Introduction: Work and thermodynamics

When people talk about work in day-to-day conversation, they generally mean putting effort into something. You might "work on a school project" or "work to perfect your baseball pitch." In thermodynamics, however, work has a very specific meaning: it is the energy it takes to move an object against a force. Work, w\text w, is one of the fundamental ways energy enters or leaves a system, and it has units of Joules (J\text J).
When a system does work on the surroundings, the system's internal energy decreases. When a system has work done on it, the internal energy of the system increases. Like heat, the energy change from work always occurs as part of a process: a system can do work, but doesn't contain work.
Photo of young child on tire swing with his feet facing the camera. The swing is near the high point of its trajectory and tilted away from the camera/viewer.
If the system is a child on a tire swing, we can do work on the system by giving it a push. We will be doing work against gravity, and this will increase the internal energy of the child on the swing, wheeee! Photo by Stephanie Sicore on flickr, CC BY 2.0
To calculate work done by a constant force, we can use the following general equation:
work=force×displacement\text{work} = \text{force} \times \text{displacement}.
For the purposes of chemistry class (as opposed to physics class), the most important takeaway from this equation is that work is proportional to the displacement as well as the magnitude of the force used. Different versions of the work equation can be used depending on the type of force involved. Some examples of doing work include:
  • A person lifting books from the ground to a shelf does work against gravity.
  • A battery pushing electrical current through a circuit does work against resistance.
  • A child pushing a box along the floor does work against friction.
In thermodynamics, we are mainly interested in work done by expanding or compressing gases.

Pressure-volume work: Work done by a gas

Gases can do work through expansion or compression against a constant external pressure. Work done by gases is also sometimes called pressure-volume or PV work for reasons that will hopefully become more clear in this section!
Let's consider gas contained in a piston.
Great question! Pistons are actually used in many mechanical applications all around us, such as inside a gasoline engine. I usually imagine a piston looking very similar to a bicycle tire pump, but here's some more information about what real pistons look like in case you are interested!
Here is a picture of the insides of a gasoline engine that shows two pistons side-by-side:
A picture of a petrol-engine that has been cut in half to show the cross section of 2 side-by-side pistons. The piston on the left is arranged with a larger volume than the piston on the right.
Photo of engine from Wikimedia Commons, CC BY-SA 3.0
The bottom part of the piston can move up and down as the pressure inside the piston changes, such as in this simplified schematic:
Schematic of a piston showing the movement of the piston head as the volume inside the piston changes. Two tubes leading to the piston can let gas in and out of the piston to regulate the movement of the piston.
Schematic of piston in movement by R. Castelnuovo from Wikimedia Commons, CC-BY-SA-3.0
This schematic also shows how the movement of the piston can be translated into other motions within the engine. In a gasoline engine, the pressure inside the piston changes when the fuel is combusted inside the piston, releasing thermal energy and causing the volume inside the piston to increase. The volume inside the piston decreases when the gas is allowed to escape from the piston. As that process is repeated, your wheels can move!
If the gas is heated, energy is added to the gas molecules. We can observe the increase in average kinetic energy of the molecules by measuring how the temperature of the gas increases. As the gas molecules move faster, they also collide with the piston more often. These increasingly frequent collisions transfer energy to the piston and move it against an external pressure, increasing the overall volume of the gas. In this example, the gas has done work on the surroundings, which includes the piston and the rest of the universe.
To calculate how much work a gas has done (or has done to it) against a constant external pressure, we use a variation on the previous equation:
work=w=Pexternal×ΔV\text {work}=\text w = - \text P_{\text{external}} \times \Delta \text V
where Pexternal\text P_{\text{external}} is the external pressure (as opposed to the pressure of the gas in the system) and ΔV\Delta \text V is the change in the volume of the gas, which can be calculated from the initial and final volume of the gas:
ΔV=VfinalVinitial\Delta \text V=\text V_{\text {final}}-\text V_{\text {initial}}
Since work is energy, it has units of Joules (where 1J=1kgm2s21\,\text J= 1\,\dfrac {\text {kg} \cdot \text m^2}{\text s^2}). You may also see other units used, such as atmospheres for pressure and liters for volume, resulting in Latm\text L \cdot \text{atm} as the unit for work. We can convert Latm\text L \cdot \text{atm} to convert to Joules using the conversion factor of 101.325J1Latm\dfrac{101.325\,\text J}{1\,\text L\cdot \text{atm}}.

The sign of work

As a matter of convention, negative work occurs when a system does work on the surroundings.
  • When the gas does work the volume of a gas increases (ΔV>0\Delta \text V>0) and the work done is negative.
  • When work is done on the gas, the volume of the gas decreases (ΔV<0\Delta \text V<0) and work is positive.
One way to remember the sign convention is to always think about the change in energy from the point of view of the gas. When the gas expands against an external pressure, the gas has to transfer some energy to the surroundings. Thus, the negative work decreases the overall energy of the gas. When the gas is compressed, energy is transferred to the gas so the energy of the gas increases due to positive work.

Example: Calculating work done on a gas

To illustrate how to use the equation for PV work, let's imagine a bicycle pump. We will assume that the air in the bicycle pump can be approximated as an ideal gas in a piston. We can do work on the air in the pump by compressing it. Initially, the gas has a volume of 3.00L3.00\,\text L. We apply a constant external pressure of 1.10atm1.10\,\text{atm} to push down the handle of the bike pump until the gas is compressed to a volume of 2.50L2.50\,\text L. How much work did we do on the gas?
We can use the equation from the previous section to calculate how much work was done to compress the gas:
w=Pexternal×ΔV=Pexternal×(VfinalVinitial)\begin{aligned}\text {w}& = - \text P_{\text{external}} \times \Delta \text V\\ \\ &=- \text P_{\text{external}} \times(\text V_{\text {final}}-\text V_{\text {initial}})\end{aligned}
If we plug in the values for Pexternal\text P_{\text{external}}, Vfinal\text V_{\text {final}}, and Vinitial\text V_{\text {initial}} for our example, we get:
w=1.10atm×(2.50L3.00L)=1.10atm×0.50L=0.55L atm\begin{aligned}\text{w}&=-1.10\,\text{atm}\times (2.50\,\text L-3.00\,\text L)\\ \\ &=-1.10\,\text{atm}\times -0.50\,\text L\\ \\ &=0.55\,\text L \cdot \text{ atm}\end{aligned}
Let's check the sign for the work to make sure it makes sense. We know the gas had work done on it, since the volume of the gas decreased. That means the value of work we calculated should be positive, which matches our result. Hooray! We can also convert our calculated work to Joules using the conversion factor:
w=0.55Latm×101.325J1Latm=56J\text{w}=0.55\,\cancel{\text L \cdot \text{atm}}\times\dfrac{101.325\,\text J}{1\,\cancel{\text L \cdot \text {atm}}}=56\,\text J
Thus, we did 56J56\,\text J of work to compress the gas in the bicycle pump from 3.00L3.00\,\text L to 2.50L2.50\,\text L.

Work when volume or pressure is constant

There are a few common scenarios where we might want to calculate work in chemistry class, and it helps to be able to recognize them when they come up. We will discuss how work is calculated for these cases.

Constant volume processes

Sometimes reactions or processes occur in a rigid, sealed container such as a bomb calorimeter. When there is no change in volume possible, it is also not possible for gases to do work because ΔV=0\Delta\text V =0. In these cases, work=0\text {work}= 0 and change in energy for the system must occur in other ways such as heat.

Bench (or stove) top reactions: Constant pressure processes

In chemistry, we will often be interested in changes in energy that occur during a chemical reaction at constant pressure. For example, you may run a reaction in an open beaker on the benchtop. These systems are at constant pressure because the pressure in the system can equilibrate with the atmospheric pressure of the surroundings.
Photograph of soup containing tomatoes, onions, and meat in a clear orange-ish broth. The metal pot is on a white stovetop, and the soup is being stirred with a black plastic spoon.
Cooking soup in an open pot is another example of a chemical reaction at constant pressure! Photo of sinigang from Wikimedia Commons, CC BY 2.0
In this situation, the volume of the system can change during the reaction, so ΔV0\Delta \text V \neq 0 and work is also non-zero. Heat can also be transferred between the system (our reaction) and the surroundings, so both work and heat must be considered when thinking about the energy change for the reaction. The energy contribution from work becomes more significant when the reaction makes or consumes gases, especially if the number of moles of gas changes substantially between the product and the reactants.
Other chemical processes result in only a small volume change, such as in the phase change from a liquid to a solid. In these cases, the energy change due to work will also be quite small, and may even be ignored when calculating the energy change. The relationship between work, heat, and other forms of energy transfer is further discussed in the context of the first law of thermodynamics.


  • Work is the energy required to move something against a force.
  • The energy of a system can change due to work and other forms of energy transfer such as heat.
  • Gases do expansion or compression work following the equation:
    work=PΔV\text {work} = -\text P\Delta \text V


This article has been adapted from the following articles:
  1. First law of thermodynamics” from UC Davis ChemWiki, CC BY-NC-SA 3.0 US.
  2. "Work" from UC Davis ChemWiki, CC BY-NC-SA 3.0 US.
The modified article is licensed under a CC-BY-NC-SA 4.0 license.

Additional References

McMurry, J.E. and Fay, R.C. (2014). Internal Energy and Enthalpy of Molecules. In General Chemistry: Atoms First (2nd ed., pp. 281-282), Upper Saddle River, NJ: Pearson.