Blood gases are a group of tests that are performed together to measure the pH and the amount of oxygen (O2) and carbon dioxide (CO2) present in a sample of blood, usually from an artery, in order to evaluate lung function and help detect an acid-base imbalance that could indicate a respiratory, metabolic or kidney disorder.