The process of removing impurities. The purity is the extent to which a substance is free from extraneous or contaminating material. A substance is considered to be pure when the level of impurity can no longer be detected. The purity is typically expressed as a percentage of the substance that is free from the extraneous material.