Abstract This paper deals with the cost analysis of a two-unit repairable system subject to on-line preventive maintenance (on-line PM) and/or repair. The policy adopted here is that the on-line PM work of the operating unit is undertaken first on its completion, the repair work of the failed unit, if any, is subsequently carried out. All the random variables that arise in the analysis are assumed to be independently and arbitrarily distributed. An expression for the expected total cost incurred by the system in a specified time interval is obtained by considering the expected busy period of the server spent on various actions. The analysis is carried out using the regeneration point technique.