Optical notch filtering is essential for many engineering applications. Optical resonant filters represent a useful alternative to achieve optical notch filtering. Designing these filters with optimal performance is significant because they can be a key component of important systems, such as optical communications, biophotonics applications, and optical sensors. The design is based on choosing the filter structural parameters optimally to achieve the best filtering properties, which are decided by the application. The filter parameters were chosen as the waveguide thickness and gratings depth. A new merit function was defined to measure the filtering properties and contained a degree of importance that ranges from zero to unity as an additional parameter in order to meet specifications. The optimization was realized systematically after simple parameters' decoupling, which was based on practical considerations. A numerical example was considered, and simulations with results were presented for complete clarification of the work. Optimizing the performance of optical resonant filters to meet the system specifications is significant and useful because it contribute to a wide range of applications that depend on optical notch filtering.