Method of producing a hydrocarbon such as methane, ethane, propane and the like from biomass. The process involves saccharifying a biomass material to produce a sugar followed by converting the sugar from the biomass into a hydrocarbon. Preferred biomass is cellulosic or lignocellulosic material from wood, particle board, sawdust, agricultural waste, sewage, silage, grasses, rice hulls, bagasse, cotton, jute, hemp, flax, bamboo, sisal, abaca, straw, corn cobs, corn stover, switchgrass, alfalfa, hay, coconut hair, seaweed and algae. The saccharifying and converting can utilize a microorganism such as an anaerobic bacteria.