Three factors influencing the process of coal formation are age, temperature and pressure.
The quality of coal deposits also depends on temperature, pressure and duration of formation, known as organic maturity. Coal formation began during the period of carbon formation (Carboniferous Period) known as the first coal age which taken between 360 million and 290 million years ago. In the beginning of the process, plant deposits turned into peat (C60H6O34) and afterward turned into lignite or also named brown coal. Lignite is coal with a low type of organic maturity.
After sustaining the effects of continuous temperature and pressure for millions of years, lignite gradually changed by increasing its organic maturity and converted into sub-bituminous coal. Chemical and physical changes continued until the coal became harder and the color is darker to form bituminous or anthracite. In the right conditions, increased organic maturity continued to form anthracite.
In the process of coal formation, organic maturity actually describes the change in concentration of every forming coal main element.
In addition, the higher rank of coal has more carbon content and less hydrogen and oxygen content. Since the rank of coal generally can be associated with the quality in general or quality of coal, the low rank coal which is also called low-quality coal such as lignite and subbituminous are usually softer with fragile and gloomy colored material such as soil and it has a high moisture content and low carbon content, therefore the energy density is also low. The higher the quality of coal, the harder and more compact it will be, and the color will be shinier black. In addition, its moisture content will be lower while its carbon content will be higher, hence the energy density will be higher.