Question

# How do you decide when to use this equation; $pV=nRT$ ?

The equation $pV=nRT$ is an ideal gas equation.
The equation of the ideal gas i.e. $pV=nRT$ is used in those conditions when either temperature, volume or pressure of a gas are constant.
- In other words, we can say that this equation or the law is used in combination with the other laws of the gas i.e. Boyle’s law ( when temperature is constant), Charles’s law 9 when pressure is constant) , Gay-Lussac’s law ( when volume is constant), Avogadro’s law ( it states that at standard conditions of temperature and pressure one mole of the gas occupies the volume of $22.4L$ and contains Avogadro number of particles i.e. $6.023\times {{10}^{23}}$) etc.
Note: Don’t get confused in the ideal and real gases. Ideal gases are those gases which obeys the gas laws at all conditions of the temperature and pressure . On the other hand, real gases are gases which obey the gas law at standard conditions of temperature and pressure i.e. at 1 atmosphere pressure and $273K$ temperature.