The gas constant is the constant of proportionality that relates the energy scale in physics to the temperature scale and the scale used for amount of substance. Thus, the value of the gas constant ultimately derives from historical decisions and accidents in the setting of units of energy, temperature and amount of substance. The Boltzmann constant and the Avogadro constant were similarly determined, which separately relate energy to temperature and particle count to amount of substance.