Hydrocarbons are compounds of carbon and hydrogen only: alkanes, alkenes and alkynes. Their formulas, their burning, and why the double bond changes everything.
The alkanes are the saturated family, every carbon bond single, with the general formula CnH2n+2: methane CH4, ethane C2H6, propane C3H8, butane C4H10. The alkenes carry one double bond and follow CnH2n, starting at ethene C2H4. The alkynes carry a triple bond and follow CnH2n-2. Within each family every extra carbon brings two extra hydrogens in step, so any member's formula can be generated from its carbon count alone, a regularity the molar mass calculator confirms instantly: each CH2 step adds 14.027 to the molar mass, the rhythm of the whole homologous ladder.
Hydrocarbons are the world's fuels because their combustion releases large amounts of energy, producing carbon dioxide and water when oxygen is plentiful. When oxygen runs short, the burning turns dirty, producing carbon monoxide, a poisonous gas, and soot. Long chain hydrocarbons from crude oil are less useful than short ones, so refineries crack them, breaking long molecules into shorter alkanes and alkenes with heat and catalysts. Cracking is an economic reaction as much as a chemical one: it converts a surplus of heavy oil into petrol range molecules and into ethene, the feedstock of much of the plastics industry.
Alkanes are relatively unreactive, burning and reacting with halogens only under energetic conditions, because their single bonds are strong and satisfied. The double bond of an alkene is a region of high electron density that invites attack, so alkenes add hydrogen, halogens, hydrogen halides and water across the bond in a family of addition reactions, and link into polymers like polythene by addition across thousands of double bonds. A drop of bromine water tells the families apart in seconds: an alkene decolourises it as the bromine adds across the bond, while an alkane leaves the orange colour standing. One bond, doubled, rewrites the chemistry of the whole molecule. The families also anchor the world's fuel vocabulary. Methane is the main component of natural gas, propane and butane are bottled gases, octane gives petrol its rating scale, and the long chains beyond twenty carbons become lubricating oils, waxes and bitumen. Crude oil is a mixture of all of them, and fractional distillation sorts the mixture by boiling point, which rises steadily with chain length, into the products at the petrol station and the airport. One family of compounds, separated by one physical property, supplies most of the energy and much of the material of modern life, which is why its chemistry is worth learning before any other organic topic.
The calculator that goes with this guide is ready on the tools page.
Check a hydrocarbon molar mass