A sustainable approach has been devised for quantifying rifaximin in pharmaceutical products, utilizing both spectrophotometric and HPLC methods. In the spectrophotometric technique, accurate measurement of absorbance at 296 nm detection wavelength was conducted by taking water and acetonitrile (1:1) as the solvent. For the HPLC method, a phenomenonex C18 250 x 4.6mm,5µ column was employed, with water and acetonitrile (1:1 v/v) serving as the mobile phase. Isocratic separation elution technique was employed at a rate of 1 mL per minute, with detection of rifaximin at 296 nm. These methods were found to be cost-effective, quick, eco-friendly, and straight forward, giving an analysis of rifaximin in 20 minutes. Application of these methods to pharmaceutical products yielded results free from matrix interference, with statistical comparison showing no significant differences among the techniques. Furthermore, the assessment of greenness conducted using AGREE software highlighted the developed methods' is environmental friendliness, which rely on solvents such as acetonitrile and water. These findings advocate for the adoption of our both analyst- and environmentally-friendly methods for the determination of rifaximin in tablet formulation over presently employed techniques.