Background: The chemical characterization is essential to validate the pharmaceutical use of vegetable raw materials. Ultraviolet spectroscopy is an important technique to determine flavonoids, which are important active compounds from Ocimum basilicum. Objective: The objective of this work was to optimize a spectrophotometric method, based on flavonoid-aluminum chloride (AlCl 3 ) complexation to determine the total flavonoid content (TFC) in leaves of O. basilicum (herbal material), using response surface methodology. Materials and Methods: The effects of (1) the herbal material: Solvent ratio (0.02, 0.03, 0.05, 0.07, and 0.08 g/mL), (2) stock solution volume (0.8, 2.3, 4.4, 6.5, and 8.0 mL) and (3) AlCl 3 volume (0.8, 1.0, 1.2, 1.4, and 1.6 mL) on the TFC were evaluated. The analytical performance parameters precision, linearity and robustness of the method were tested. Results: The herbal material: Solvent ratio and stock solution volume showed an important influence on the method response. After choosing the optimized conditions, the method exhibited a precision (RSD%) lower than 6% for repeatability (RSD%) and lower than 8% for intermediate precision (on the order of literature values for biotechnological methods), coefficient of correlation of 0.9984, and no important influence could be observed for variations of the time of complexation with AlCl 3 . However, the time and temperature of extraction were critical for TFC method and must be carefully controlled during the analysis. Conclusion: Thus, this study allowed the optimization of a simple, fast and precise method for the determination of the TFC in leaves of O. basilicum, which can be used to support the quality assessment of this herbal material.