The work done by perfect gas when it expands reversibly and isothermally is equal to area under the isothem p=nRT/V. The work done during the irreversible expansion against the same final pressure is equal to the rectangular area shown slight darker. Note that the reversible work is greater than the irreversible work.