The contents of caffeine and sodium benzoate injection may be determined by P-matrix method without separation of its components. BSAIC language is used for programming. The average recovery of caffeine is 100.0% and that of sodium benzoate is 99.95%. The variation coefficient of caffeine is 0.40% and that of sodium benzoate is 0.65%. On the basis of recovery rate and data observed it is concluded that this method is accurate, reliable, simple and rapid as compared with the standard pharmacopoeia regulations.