A simple spectrophotometric method was developed for determination of trifluralin in commercial formulation and food samples. The method was based on the hydrolysis of trifluralin with sodium hydroxide to form 2,6-dinitro-4-trifluoromethylaniline. The resultant aniline group was diazotized with nitrate in acidic media and the diazotized product was coupled with β-naphthol to form red colored product having λmax 550 nm. The reaction conditions were optimized for hydrolysis as well as for the diazotization reaction. The Beer’s law was obeyed over the range of 0.2–17 μg mL−1 with molar absorptivity of 1.5 × 104 L mol−1 cm−1. The relative standard deviation was found to be 3.6%. A two level factorial design of 23 was used for optimization of all parameters. The influence of different factors and their interactions on the final azo dye formation were also studied from these factorial designs. The method has been applied successfully for the analysis of commercial formulations and agricultural samples. The recovery for the determination of trifluralin was found to be in the range 95–97%.