We describe here a technique called phase tracking that greatly improves the accuracy of measurements of the membrane capacitance of single cells. We have modified the original phase detection technique to include a method for creating calibrated changes in the resistance in series with the cell. This provides a method to automate the adjustment of the phase detector to the appropriate phase angle for measuring membrane capacitance. The phase determination depends only on the cell's electrical parameters and does not require matching of the cell impedance with that of the slow capacitance cancellation circuitry of the patch-clamp amplifier. We show here that phase tracking can accurately locate the phase of the capacitance signal and can keep the detector aligned with this signal during measurements of exocytosis in mast cells, irrespective of the large drifts which occur in cell membrane resistance, membrane capacitance, or series resistance. The phase tracking technique is a valuable tool for quantifying exocytosis and endocytosis in single cells.