The ideal gas equation relating pressure (P), volume (V), and absolute temperature (T) is given as:
PV = nRT
Where,
R is the universal gas constant = 8.314 J mol–1 K–1
n = Number of moles = 1
T = Standard temperature = 273 K
P = Standard pressure = 1 atm = 1.013 × 105 Nm–2

Hence, the molar volume of a gas at STP is 22.4 litres.