The derivation of Avogadro's law follows directly from the ideal gas law, i.e.
where R is the gas constant, T is the Kelvin temperature, and P is the pressure (in pascals).
Solving for V/n, we thus obtain
Compare that to
which is a constant for a fixed pressure and a fixed temperature.
An equivalent formulation of the ideal gas law can be written using Boltzmann constant k, as
where N is the number of particles in the gas, and the ratio of R over k  is equal to the Avogadro constant.
In this form, for V/N is a constant, we have
If T and P are taken at standard conditions for temperature and pressure (STP), then k′ = 1/n, where n is the Loschmidt constant.