Based on the theory of stochastic resonance, a new algorithm was presented to enhance the signal-to-noise ratio (SNR) of weak HPLC/UV signals of triclocarban in water samples with a new method for optimizing the system parameters. The method was applied to experimental weak signals of HPLC/ UV, which was embedded in the noise background, and the SNR was enhanced greatly. The algorithm was employed to detect triclocarban residue in water with solid-phase extraction--high-performance liquid chromatography. The limit of detection and the limit of quantification were improved from 10 ng L(-1) and 50 ng L(-1) to 1 ng L(-1) and 5 ng L(9-1), respectively. The results showed an excellent quantitative relationship between concentrations and chromatographic responses.