This study presents a model for obtaining the exact optimal solution of inventory replenishment policy problem. The proposed model, called the ''two-equation model'', includes two governing equations and a time-frequency algorithm: the first equation determines the optimal replenishment times for a specified number of replenishments; the second equation determines the optimal number of replenishments. The time-frequency algorithm includes two main procedures to solve the first and second equations. In contrast to many approximation approaches, this model exactly solves the first equation, a simultaneous non-linear equations system using a generalized matrix-based solver. This study also examines the classical no-shortage inventory replenishment policy for linear increasing and decreasing trend demand. According to these results, the solution given by the two-equation model is an exact solution.