In this paper, we study an extended warranty model under which the customer is offered an additional warranty period after the original two-phase warranty expires. Under the original two-phase warranty, the warranty period is divided into two non-overlapping subintervals, one of which is for replacement warranty, and the other is for minimal repair warranty. If the system failure occurs during the original warranty period, the failed system is either replaced or minimally repaired by the manufacturer, and if the failure occurs during the extended warranty period, only the minimal repair is conducted. For the system failure during the replacement warranty period, the failed system is replaced by a new one, and the warranty term is renewed anew. Following the expiration of extended warranty, the customer is solely responsible for maintaining the system for a fixed length of time period and replaces the system at the end of such a maintenance period. During the maintenance period, only the minimal repair is given for each system failure. Such a maintenance model can be considered as a generalization of several existing maintenance models which can be obtained as special cases. The main purpose of this article is to determine, from the customer’s perspective, the optimal length of maintenance period after the extended warranty expires. As the criterion to determine the optimal replacement strategy, we adopt the expected cost rate per unit time during the life cycle of the system. Given the cost structures incurred during the life cycle of the system, we formulate the expected cost and the expected length of life cycle to obtain the expected cost rate. The uniqueness of optimal solution for the decision variable is verified when the life distribution of the system shows an increasing failure rate. Numerical examples are provided to illustrate the proposed optimal replacement strategy.