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 units of (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. 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
A more general representation of thisrelationship integrates the force applied over the distance spanned.
 Whitten, et al. 10th Edition. Pp. 571