In this work, a simple spectrophotometric methodology based on the competitive aggregation in a dyesurfactant- drug system is described for the determination of pharmaceutical compounds. This is a modification of recently established surfactant to dye binding degree method. Eriochrome Blue Black R (EBBR) and Didodecyldimethylammonium bromide (DDABr) were the dye and surfactant used, respectively. In the proposed method, the anions of EBBR bind to the cationic DDABr molecules to form dye-surfactant aggregates. Upon adding an amphiphilic drug to the mixture, the drug competes with the dye to interact with the surfactant, which results in a decrease in dye-surfactant aggregates formation. This causes a change in UV-Vis absorption properties of the dye. The measurement parameter is the difference between the absorption of the dye in the presence and absence of the drug. In the appropriate experimental conditions the absorbance differences are directly proportional to the drug concentration. Piroxicam and folic acid are used as two model drugs to develop the methodology. The influence of variables such as pH, concentrations of buffer, EBBR and DDABr on the measurement parameter was studied. Under the optimum conditions, the calibration graphs were linear up to 1.6 and 2.7 ig ml-1 for piroxicam and folic acid, respectively, with the corresponding detection limits of 0.05 and 0.09 ig ml-1. The method was applied to the determination of the drugs in pharmaceutical formulations.