Work done by an expanding gas is calculated from the pressure and the change in volume: at constant external pressure, the work done by the gas is W = PextΔV. Enter the external pressure and the initial and final gas volumes to calculate work in joules; the calculator uses the chemistry convention, where work done on the system is negative during expansion.
Formula
For a gas expanding or compressing against a constant external pressure, chemistry defines pressure–volume work on the system as w = −PextΔV, where ΔV = Vf − Vi. The work done by the gas has the opposite sign: Wby = PextΔV. The calculator’s first result is work on the gas, the common thermodynamics sign convention for a system.
- Pext is the constant pressure opposing the gas, in pascals (Pa).
- Vi and Vf are initial and final volumes in litres (L).
- ΔV is the volume change in cubic metres (m³) when used with pressure in pascals.
- w is work on the gas in joules (J); Wby is work done by the gas, also in joules.
Because 1 L = 0.001 m³, the calculator converts the volume difference using (Vf − Vi)/1000. Since 1 Pa·m³ = 1 J, this gives work directly in joules. The formula assumes a constant external pressure; it is not the general formula for every expansion.
Worked Example
Using the default values—external pressure 101325 Pa, initial volume 1 L, and final volume 2 L—first find the volume change:
ΔV = 2 L − 1 L = 1 L = 1/1000 m³ = 0.001 m³.
Work on the gas is:
w = −PextΔV = −101325 Pa × 0.001 m³ = −101.325 J ≈ −101.33 J.
The corresponding work done by the gas is +101.325 J, or 101.33 J to two decimal places. The two outputs describe the same energy transfer with opposite sign conventions.
Assumptions
- The external pressure stays constant throughout the volume change.
- The entered volumes are gas volumes, and their difference is converted from litres to cubic metres.
- The sign convention for the first result is work on the gas; expansion therefore gives a negative value.
- The calculation covers pressure–volume work only, not heat transfer or other forms of work.
Why Expansion Produces Work
A gas exerts force on its surroundings as it pushes a movable boundary outward. Work is energy transferred through that motion. In a piston illustration, gas pressure pushes the piston through a distance; the gas can thereby lift a load or move another object. For a simple piston of cross-sectional area A, a small boundary displacement dx changes volume by dV = A dx. With a constant opposing pressure, the incremental work by the gas is PextdV. Adding these increments gives Wby = PextΔV.
In chemistry, the system is usually the gas, and the surroundings are everything outside it. Under the convention ΔU = q + w, energy entering the system is positive. Expansion pushes the surroundings and transfers energy out of the gas, so w is negative. Some physics and engineering contexts report work done by the gas instead; that quantity is positive during expansion. Always check which convention a problem uses before comparing answers.
When the Simple Formula Applies
Use w = −PextΔV when the external pressure is constant, such as a gas expanding against a steady load or a fixed ambient pressure in an idealized problem. The pressure in this equation is the pressure opposing the moving boundary—not automatically the gas’s internal pressure. If the gas expands irreversibly against a constant surrounding pressure, the external pressure is the relevant pressure for the work calculation.
For a changing external pressure, use the more general expression:
w = −∫ViVfPextdV.
This integral adds the work for each small volume change at its corresponding external pressure. A pressure-versus-volume graph can make the calculation clearer: the area under the pressure curve gives the magnitude of pressure–volume work, with the sign determined by the chosen convention.
Common Mistakes and Limits
- Mixing sign conventions: “work done by the gas” and “work done on the gas” have opposite signs. State which one you report.
- Using the wrong pressure: the constant-pressure formula uses external pressure. Internal gas pressure may differ during a nonequilibrium or irreversible process.
- Mixing units: pascals multiplied by litres does not directly give joules. Convert litres to cubic metres, or use a consistent alternative unit system.
- Assuming all expansions have the same work: initial and final volumes alone are insufficient if external pressure varies. You need the pressure path or another model of the process.
The formula does not calculate heat or the total change in internal energy by itself. For a closed system following the chemistry convention, the first law is ΔU = q + w. To find ΔU, heat transfer q and any other relevant work must also be known. Nor does this calculator determine the gas’s pressure during expansion; it takes the opposing external pressure as an input.
Frequently Asked Questions
What is the formula for work done by an expanding gas?
At constant external pressure, work done by the gas is Wby = Pext(Vf − Vi). In the chemistry convention, work on the gas is the negative of that result.
Why is work negative when a gas expands?
Chemistry commonly defines work as energy transferred to the system. During expansion, the gas transfers energy to its surroundings, so work on the gas is negative. Work done by the gas is positive.
Is the pressure in the formula internal or external?
For constant-pressure expansion work, use the external pressure opposing the boundary. Internal pressure is used only when the process model specifically justifies it, such as a reversible quasistatic path where the pressures are effectively equal at each step.
How do I calculate expansion work if pressure changes?
Integrate the external pressure over the volume change: w = −∫PextdV. You need the pressure as a function of volume, or enough information to determine the area under the pressure–volume curve.
Does a gas always do work when it expands?
It does pressure–volume work when expansion moves a boundary against an opposing pressure. In a free expansion into a vacuum, the external pressure is zero, so the pressure–volume work is zero even though the gas occupies a larger volume.
Related
Formula used
in p | External pressure | Pa | 101325 | 0 in vi | Initial gas volume | L | 1 | 0 in vf | Final gas volume | L | 2 | 0 out w | Work done on gas | J | -p * ((vf - vi) / 1000) | 2 out wg | Work done by gas | J | p * ((vf - vi) / 1000) | 2
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation with the constants and conversion factors written on the page, rounded as each result states. See method and constants, the disclaimer or report an error.
More in this section
- Isotope Percent Abundance Calculator and How to Use It75.91 %
- Percentage Abundance Calculator and How to Find It
- Percent Abundance Formula: Calculate Isotope Percentages25.00 %
- Isotope Fractional Abundance Calculator and Formula0.2409 fraction
- Isotope Percent Abundance Calculator and How to Use It50.00 %
- Isotope Percent Abundance Calculator and How-To Guide75.91 %