The significant reduction in the solar panels’ efficiency due to soiling can be mitigated through periodic cleaning, however, this comes at the expense of increased operational costs. Soiling rates are influenced by factors such as geographical location, season, system configuration, weather, and meteorological conditions. Optimizing cleaning frequency based on specific experimental conditions has limitations. Alternatively, numerical analysis can be employed to generalize and incorporate significant factors into the dust deposition model, thereby enhancing the applicability of the optimized model. This study aims to determine the optimum cleaning frequency that maximizes power gain while minimizing cleaning costs, utilizing numerical analysis to model the dust deposition rate. An optimization model is developed to determine the cleaning intervals based on surrounding conditions dynamically. The model minimizes the sum of cleaning costs and revenue loss due to soiling. The decline in photovoltaic efficiency from soiling is modeled using empirical equations in terms of dust deposition rate, derived through regression analysis from numerical results. The model is validated using a case study from the literature and then applied to a more generalized scenario. Results reveal that the cleaning interval dynamically varies throughout the year as surrounding conditions change, illustrating the significant contribution of this approach.