The amount of caffeine in regular and decaffeinated coffee can be determined using a Primesep SB column. The HPLC method combines reversed-phase and polar interactions to elute caffeine without interference from the coffee complex mixture. This method can be made even more robust by incorporating a diverter valve and a guard column to prevent late eluting components from sticking to the Primesep SB column. The sample is injected onto the guard column and after a defined time point, the eluent flow is reversed to elute the caffeine peak onto the analytical column without the late eluters that can shorten column life. The HPLC separation uses a mobile phase of water, methanol (MeOH) and phosphoric acid (H3PO4) and UV detection at 270 nm.