Let be the number of states in a system, then the entropy S of the system is defines by
where k is Boltzmann's constant. If denotes the number of states with energy E, then for f degrees of freedom,
and for a monatomic ideal gas,
where V is the volume and N is the number of molecules. If the energy is a continuous instead of a discrete function with defined as the density of states, then the number of states in range is given by