Coffee beans contain carbon dioxide immediately after roasting. The degassing starts right after roasting and is the process of seeping out the gasses from the beans. A lot of the CO2 leaves the beans in the first 24 hours after roasting; that is about 40%. Lighter roasts degass slower, whereas dark roasts degass faster. Gasses in the coffee beans are a sign of a freshly roasted coffee.

Carbon dioxide is a naturally occurring chemical compound composed of two oxygen atoms covalently bonded to a single carbon atom. It is a gas at standard temperature and pressure and exists in Earth’s atmosphere in this state, as a trace gas at a concentration of 0.039 per cent by volume. As part of the carbon cycle, plants, algae, and cyanobacteria use light energy to photosynthesize carbohydrate from carbon dioxide and water, with oxygen produced as a waste product.

Carbon dioxide is used for the production of carbonated water, and soft drinks.

Coffee beans are optimal after this initial degassing period. If beans are brewed directly after roasting, the escaping carbon dioxide will affect the brew and the result will be small air bubbles in the coffee cup.

Dark roasted beans degass faster because they are in contact with heat longer during the roasting process, which speeds up extraction. Therefore, optimum time to brew dark roasted coffee is after three or four days of roasting whereas lighter roasts benefit from being left for a week after roasting before they are brewed.