If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

Pressure-volume work

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:

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, is one of the fundamental ways energy enters or leaves a system, and it has units of Joules (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:
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.
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:
where Pexternal is the external pressure (as opposed to the pressure of the gas in the system) and ΔV is the change in the volume of the gas, which can be calculated from the initial and final volume of the gas:
Since work is energy, it has units of Joules (where 1J=1kgm2s2). You may also see other units used, such as atmospheres for pressure and liters for volume, resulting in Latm as the unit for work. We can convert Latm to convert to Joules using the conversion factor of 101.325J1Latm.

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) and the work done is negative.
  • When work is done on the gas, the volume of the gas decreases (Δ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.00L. We apply a constant external pressure of 1.10atm to push down the handle of the bike pump until the gas is compressed to a volume of 2.50L. 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:
If we plug in the values for Pexternal, Vfinal, and Vinitial for our example, we get:
w=1.10atm×(2.50L3.00L)=1.10atm×0.50L=0.55L atm
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:
Thus, we did 56J of work to compress the gas in the bicycle pump from 3.00L to 2.50L.

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. In these cases, 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 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:

Want to join the conversation?

  • blobby green style avatar for user summer.cruel01
    Work = Pext * V ..but why Pext ,why not Pinternal ??, it doesnt sense to me ,please explain.
    (14 votes)
    Default Khan Academy avatar avatar for user
    • blobby green style avatar for user C Hart
      Another way to think about it: if you are strong enough to lift 100 lbs, but only lift 20 lbs, is the work based on what you COULD move or ACTUALLY move? It's similar for a gas. Just because its internal pressure is 100 atm, if it only has to push against 20 atm, then that defines the amount of work. Would it take any work to push against a vacuum (Pext = 0)? No. Just like it wouldn't take any work to lift 0 lbs (or 20 lbs if there was no gravity). It's all about the resistance.
      (81 votes)
  • blobby green style avatar for user Hardik Gupta
    I'm a bit confused with the sign of work in physics and chemistry.
    In physics it is given that work is negative when the gas compresses and is positive when expands but in latter it is given that work is positive when it compresses. Also i just saw equation for internal energy, in chemisrty it's dU=q+w and in physics it's dQ=dU+dW. Why are they different?
    (9 votes)
    Default Khan Academy avatar avatar for user
    • spunky sam blue style avatar for user Ernest Zinck
      In chemistry, the convention is that anything going out of the system is negative and anything coming into the system is positive.
      If your system is a gas in a piston, work is being done on the system when it is being compressed, so the work done on the system is positive, and the work done by the system is negative.
      (17 votes)
  • aqualine ultimate style avatar for user Jayanth Phani Sai Y
    Can we state:
    During a process, (work done by system) + (work done on system) = '0'
    (5 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user Lilah Bleich
    In the work done equation w=−Pexternal×ΔV why is the external P negative? what does it have a negative sign before it?
    (3 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user uncommonsensejcs
    If oxygen and a combustible fuel are mixed in a combustion chamber that is in equilibrium with the ever expanding vacuum of space how can any work be done? W = P ext is 0 X any number for change in volume = zero, because any number muitiplied by zero is zero, therefore 0 work is performed. My conclusion is rockets can not produce thrust in the supposed vacuum of space, because there is no resistance/pressure to work on. If I am wrong than so is the P V work formula, and please don't throw Newton's third law as an answer, without explaining where the reaction comes from because pushing off nothing makes no sense, and in a vacuum the gasses are subject to free expansion. If fuel and oxygen are mixed in the combustion chamber and somehow ignited the laws of free expansion eliminate any work from being performed and therefore no thrust happens because there is no external resistance/pressure to get an opposite and equal reaction from. If burnt gasses come out of the nozzle (action) they will be obsorbed by the infinite vacuum of space A.K.A. free expansion therefore no gas will acculmate at the nozzle to push off or react upon as I have heard some space agencies claim. If anyone can answer how propulsion happens in the ever expanding vacuum of space using rocket technology with math that does not conflict with the PV work formula I would like to hear the answer.
    (4 votes)
    Default Khan Academy avatar avatar for user
    • blobby green style avatar for user Francisco Briseno
      Nice question, but incomplete, you forgot to add gravity, which there is no place in our universe with zero gravity as gravity is a field, also, the addition of time. There is nothing in our universe that reacts instantly as that would get a speeding ticket for going faster than the speed of light speed limit,not to include the things that are already travelling faster than the speed of light as they would get a slowing ticket for going past, or below the speed of light, starting at the Planck scale. Lastly, if you don't want to hear Newton's third law then there is no sense of talking about a spherical world. The flat Earth Society claim to have members all over the "globe". The math you requested: (Rocket mass and Energy) - (gas mass and Energy) = 0. In other words, at the initial starting point in the middle of nowhere in the universe, at the final time of reaction, if you were to go where the initial reaction occurred, you would find zero mass and or energy and not your rocket with the gas and oxygen sucked out instantly by the abstract mislead concept of a vacuum as nothing sucks. Suction is the pushing towards you, and pushing is the pushing away from you. No third law was injured or killed in this comment, names were withheld to protect the guilty.
      (1 vote)
  • leaf blue style avatar for user Jessica Ezemba
    Could someone please simplify this text in the article (below)?
    Thank you!
    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!
    (1 vote)
    Default Khan Academy avatar avatar for user
    • piceratops seed style avatar for user RogerP
      It's basically saying that the gasoline combusts inside the piston and this releases heat. The heat causes the gases in the piston to expand and this forces the piston out. This movement of the piston is mechanical work that can be used to move the wheels.

      The combustion gases are then released through a valve and the piston moves back, ready to start the cycle again.
      (5 votes)
  • aqualine ultimate style avatar for user Ben Hamilton
    Why is the conversion between Liter-atmospheres and Joules the same as atmospheres to kiloPascals?
    (1 vote)
    Default Khan Academy avatar avatar for user
    • spunky sam blue style avatar for user tska84
      101.325J = 101.325N*m ; 1L*atm*(1m^3/1000L)*(101.325kPa/atm) = (1m^3*101.325kPa)/1000 = 1m^3*101.325Pa = 1m^3*101.325N/m^2 = 101.325N*m = 101.325J tried to break that down as much as possible hope it helps. Essentially the 1000 factor from converting L to meters cubed cancels out the kilo in the the kilopascal. Then the only other factor left is the 101.325.
      (4 votes)
  • blobby green style avatar for user Rene Lemus
    What happens when both pressure and volume vary during a compression process?
    (2 votes)
    Default Khan Academy avatar avatar for user
  • piceratops ultimate style avatar for user wanglx123456789
    why is it -P in the equation of pressure-volume work?
    (1 vote)
    Default Khan Academy avatar avatar for user
    • leaf red style avatar for user Richard
      It's meant to show if energy is flowing into or out of the system when work is involved.

      For example if you have a sample of gas in a flexible container and it expands the container to a greater volume than its initial volume, then that results in a positive ΔV. So without the negative sign in the front of the PΔV, the work would be positive. And a positive work means energy went into the system and resulted in a higher amount of energy than when it began. Which doesn't make sense since the gas has to exert force to expand the container and hence had to use up energy to do so. So if it used energy to expand the container, why then would it have gained energy? That's why the negative sign is include to show that the gas was performing work and losing energy to the surroundings.

      Hope that helps.
      (2 votes)
  • blobby green style avatar for user junkrigsailor
    What is the s you are squaring in the first formula above for the energy of work? (5th paragraph of Pressure-Volume Work: Work Done by a Gas)
    (1 vote)
    Default Khan Academy avatar avatar for user