As any serious chemistry student can attest, the difference between acids and bases can be distinguished through their pH level. Bases have a pH value above 7.0 and produce blue color on red litmus paper, while acids have pH levels lower than this threshold and produce yellow or red colors on litmus paper. Coffee’s acidic level stands at around 5 on this scale compared with popular drinks like orange juice (3.8 on this same scale).

What makes coffee acidic is its chemical composition: organic and inorganic compounds with acidic components such as citric, malic, lactic, tartaric and pyruvic acids among others. These can be divided into two categories of organic acids (OAs) and chlorogenic acids (CGAs); with organic acids like citric, malic, lactic, tartaric and pyruvic all found within coffee varieties while chlorogenic acids come from plant polyphenols; their concentration varies between varieties; while Phosphoric acid also exists within coffee varieties to some degree as another inorganic component present in its makeup.

While multiple factors contribute to coffee’s acidic content, one of the primary determining factors is where and how it was grown. Coffee beans harvested at lower altitudes using dry processing tend to contain less acidity than those from higher elevations or darker roasts.

Coffee’s acidic profile is also affected by roasting and grinding size variables, with these changing its acidity substantially and leading to lively debate among connoisseurs of this beverage.

Notably, coffee remains considered a “base” substance by chemists despite its acidic composition. While acids alter the color or flavor of any liquid when mixed with them, bases do not cause changes that alter these qualities; hence the reason coffee works well when combined with milk and is generally safe to consume.

There are, however, exceptions to this general rule. One OA that causes stomach upset in coffee is N-alkanoly-5-hydroxytryptamides (NMPs), though their presence can be decreased by grinding beans finer and steeping for longer. Cold brew coffee may be easier on sensitive stomachs due to its lower extraction temperatures. This allows NMPs (natural molecular products) time to dissipate before causing any irritation in the digestive tract, including caffeine which does not contribute as strongly to acidity than an acid can.