The Work by a Gas calculator computes the amount of energy acting on an amount of gas based on external pressure and the change in volume.
INSTRUCTIONS: Choose units and enter the following:
Work (W): The calculator returns the work done by or on the system in Joules. However, this can be converted to compatible units (e.g. N•m) via the pull-down menu.
The Work by a Gas calculator computes the amount of force it takes to displace an object, in chemistry's case the force is the external pressure of molecules exerting force on the system, and the displacement is the change of volume. Work equation is used in the Internal energy equation[3]. If work is positive then the system does the work, if the work is negative then the work is done on the system.
The work equation is calculated by
W = -P * ΔV
where :
A more general representation of this work= force*distance relationship integrates the force applied over the distance spanned.
[1]https://en.wikipedia.org/wiki/Work_(physics)#Work_by_a_gas
[2] Whitten, et al. 10th Edition. Pp. 571