In this paper, under the manufacturer’s point of view, a warranty cost model is proposed in consideration of both repair service and replacement service simultaneously upon the system failure to find the optimized warranty period in terms of an expected cost rate during the warranty cycle. If a failed system can’t be repaired by the threshold warranty servicing time in the warranty service center, the replacement service is provided for the failed system instead of continuing to provide the repair service. Under such circumstance, new warranty cost models are developed and the renewable warranty policy is investigated for free and pro-rata two-dimensional warranty dependent on both failure time and warranty servicing time. From the manufacturer’s point of view, the warranty period is newly defined starting from the system’s purchasing time and ending at the expiration time of the warranty. This paper determines the optimal warranty period by applying Nelder–Mead downhill simplex method to minimize the expected cost rate during the warranty period. The real application is discussed adopting the proposed approach based on the actual field data and numerical examples are presented to exemplify the applicability of the methodologies derived in this paper.