Ideal gas law
The ideal gas law is the equation of state of a hypothetical ideal gas, first stated by Benoit Paul Emile Clapeyron in 1834.
where
The value of the ideal gas constant, R, is found to be as follows.
The ideal gas law mathematically follows from a statistical mechanical treatment of primitive identical particles (point particles without internal structure) which do not interact, but exchange  momentum (and hence kinetic energy) in elastic collisions.
Since it neglects both molecular size and intermolecular attractions, the ideal gas law is most accurate for monoatomic gases at high temperatures and low pressures. The neglect of molecular size becomes less important for larger volumes, i.e., for lower pressures. The relative importance of intermolecular attractions diminishes with increasing thermal kinetic energy i.e., with increasing temperatures.  More sophisticated equations of state, such as the van der Waals equation,
allow deviations from ideality caused by molecular size and intermolecular forces to be taken into account.

# Alternative forms
As the amount of substance could  be given in mass instead of moles, sometimes an alternative form of the ideal gas law is useful. The number of moles (n\, ) is equal to the mass (\, m ) divided by the molar mass (\, M ):
Then, replacing \, n  gives:
from where
This form of the ideal gas law is particularly useful because it links pressure, density  \rho = m/V,  and temperature in a unique formula independent from the quantity of the considered gas.
In statistical mechanics the following molecular equation is derived from first principles:
Here \,k is Boltzmann's constant, and \,N is the actual number of molecules, in contrast to the other formulation, which uses \,n, the number of moles. This relation implies that N\,k = nR, and the consistency of this result with experiment is a good check on the principles of statistical mechanics.
From here we can notice that for an average particle mass of  \mu  times the 
atomic mass constant m_\mathrm{u} (i.e., the mass is \mu u)
and since  \rho = m/V , we find that the ideal gas law can be re-written as:
One more equation involves density where:
where M is the mass and D is the density.

# Calculations

# Derivations

## Empirical
The ideal gas law can be derived from combining two empirical gas laws: the combined gas law and Avogadro's law.  The combined gas law states that
where C is a constant which is directly proportional to the amount of gas, n (Avogadro's law).  The proportionality factor is the universal gas constant, R,  i.e. C=nR.
Hence the ideal gas law

## Theoretical
The ideal gas law can also be derived from first principles using the kinetic theory of gases, in which several simplifying assumptions are made, chief among which are that the molecules, or atoms, of the gas are point masses, possessing mass but no significant volume, and undergo only elastic collisions with each other and the sides of the container in which both linear momentum and kinetic energy are conserved.

## Derivation from the statistical mechanics
Let q = (qx, qy, qz) and p = (px, py, pz) denote the position vector and momentum vector of a particle of an ideal gas,respectively, and let F denote the net force on that particle, then
\begin{align}
\langle \mathbf{q} \cdot \mathbf{F} \rangle &= \Bigl\langle q_{x} \frac{dp_{x}}{dt} \Bigr\rangle + 
\Bigl\langle q_{y} \frac{dp_{y}}{dt} \Bigr\rangle + 
\Bigl\langle q_{z} \frac{dp_{z}}{dt} \Bigr\rangle\\
&=-\Bigl\langle q_{x} \frac{\partial H}{\partial q_x} \Bigr\rangle -
\Bigl\langle q_{y} \frac{\partial H}{\partial q_y} \Bigr\rangle - 
\Bigl\langle q_{z} \frac{\partial H}{\partial q_z} \Bigr\rangle = -3k_{B} T,
\end{align}
where the first equality is Newton's second law, and the second line uses Hamilton's equations and the equipartition theorem. Summing over a system of N particles yields
3Nk_{B} T = - \biggl\langle \sum_{k=1}^{N} \mathbf{q}_{k} \cdot \mathbf{F}_{k} \biggr\rangle.
By Newton's third law and the ideal gas assumption, the net force on the system is the force applied by the walls of their container, and this force is given by the pressure P of the gas. Hence
-\biggl\langle\sum_{k=1}^{N} \mathbf{q}_{k} \cdot \mathbf{F}_{k}\biggr\rangle = P \oint_{\mathrm{surface}} \mathbf{q} \cdot \mathbf{dS},
where dS is the infinitesimal area element along the walls of the container. Since the divergence of the position vector q is
\boldsymbol\nabla \cdot \mathbf{q} =
\frac{\partial q_{x}}{\partial q_{x}} + 
\frac{\partial q_{y}}{\partial q_{y}} + 
\frac{\partial q_{z}}{\partial q_{z}} = 3,
the divergence theorem implies that
P \oint_{\mathrm{surface}} \mathbf{q} \cdot \mathbf{dS} = P \int_{\mathrm{volume}} \left( \boldsymbol\nabla \cdot \mathbf{q} \right) dV = 3PV,
where dV is an infinitesimal volume within the container and V is the total volume of the container.
Putting these equalities together yields
3Nk_{B} T = -\biggl\langle \sum_{k=1}^{N} \mathbf{q}_{k} \cdot \mathbf{F}_{k} \biggr\rangle = 3PV,
which immediately implies the ideal gas law for N particles:
PV = Nk_{B} T = nRT,\,
where n=N/NA is the number of moles of gas and R=NAkB is the gas constant.
The readers are referred to the comprehensive article 
Configuration integral (statistical mechanics)
where an alternative statistical mechanics derivation of the ideal-gas 
law, using the 
relationship between 
the Helmholtz free energy
and 
the partition function, 
but without using the 
equipartition theorem, is provided.