In this study, we synthesized new sulfamethoxazole azo derivative by converted the SMZ drug to diazonium salt and coupling it with salbutamol in the alkaline medium to form an orange water-soluble azo dye that has a maximum absorption at λmax 450 nm. This reaction was used in the spectrophotometric determination of SMZ drug. It was obeyed to beer-lambert,s low over concentration between (10–100 mg.L-1) with LOD (0.507 mg.L-1), LOQ (1.5 mg.L-1) and molar absorptivity (2332.2 L.mol-1.cm-1). The approach indicated great sensitivity for the assessment of chosen medicine. Another method, a new cloud point extraction approach, was successfully used to extract the SMZ medication in its pure form as well as in pharmaceutical formulations. Due to its features and structure, non-ionic surfactant, also known as 2-[4-(2,4,4-trimethylpentan-2-yl)phenoxy] ethanol, was chosen as the green extraction solvent in this study. The effect of several parameters on the CPE of Sulfamethoxazole, including as the type and volume of surfactant, salt, temperature, and incubation duration, was thoroughly researched, and a set of ideal conditions was established. The correlation coefficient (R2) for the calibration curve was found to be 0.9956. The limit of detection (LOD), limit of quantitation (LOQ) and molar absorptivity were 0.122 mgL-1, 0.403 mg.L-1 and 11319.41 L.mol-1.cm-1, respectively.