For the expansion (or compression) of an ideal gas from an initial volume V 0 and pressure P 0 to a final volume V and pressure P at any constant temperature, the change in entropy is given by: Δ Δ S = n R ln ⁡ ⁡ V V 0 = − − n R ln ⁡ ⁡ P P 0 Here n is the amount of gas (in moles) and R is the ideal gas constant. These equations also apply for expansion into a finite vacuum or a throttling process, where the temperature, internal energy and enthalpy for an ideal gas remain constant.