The octane number (and quality) of petrol can be improved by adding branched alkanes, aromatics, some oxygen-organic compounds and the now banned tetra-ethyl-lead.

The refining of petroleum or crude oil consists of fractional distillation in which the oil is vaporized, then passed up a tower where, at different levels producing different temperatures, the various constituents condense at different levels to be removed. The different fractions are shown in the next table.

Cracking is the breaking of oil molecules into smaller molecules; (from a lower level in the table to a higher level) such as cracking kerosene to make the molecularly smaller petrol. The smaller the molecule the lower the condensation temperature and so the further up the tower the oil goes before condensing.
Table 19 - 1: Petroleum or crude oil
FractionCompositionBoiling range (0C)Uses
gasC1 − C4< 30heating fuel
petrolC5 − C1230 − 200motor fuel
keroseneC12 − C16180 − 300jet & diesel fuel
heating fuel oilsC16 − C18 > 300diesel fuel, heating fuel oil, cracking stock
lubricating oilsC18 − C20 > 350lubricating oil, cracking stock
paraffin waxesC20 − C40low melting solidscandles, wax paper
bitumenabove C40gummy residuesroofing tar, road bitumen

Natural gas
Natural gas consists of:
Ethane, propane and butane are separated from natural gas. Ethane is used in the petrochemical industry.
LPG liquefied petroleum gas
LPG liquefied petroleum gas consists of:
Calor gas
Calor gas is mainly of butane C4H10
Miscellaneous
phenol = hydroxylbenzene
toluene = methylbenzene