PV inverters can provide ancillary services while simultaneously providing active power. A transactive energy system (TES) incentivizes a PV inverter to provide ancillary services and compensates for the cost of additional power losses due to additional reactive power production. However, providing ancillary services can shorten the lifetime of the PV inverter since additional reactive power increases the thermal stress of it. This paper models the lifetime shortening effect of a PV inverter when providing ancillary services. Based on the lifetime estimation, an improved marginal cost curve of reactive power generation for the PV inverter is proposed. The improved marginal cost considers the normalized lifetime (NLT) of the PV inverter given the active power, reactive power, and ambient temperature. The proposed NLT algorithm is validated by a simulation case study.