Custom power quality (PQ) plays a significant part in improving PQ in distribution networks and hedging economic losses for power‐quality‐sensitive electricity users. In an electricity market with multiple power companies competing with each other, for a power company, providing custom PQ with proper service prices becomes a key element to maximize its total economic profit and improve competitiveness. In this work, with a focus on the voltage sag (VS) problem, a stochastic investment model for installing voltage‐sag‐preventing equipment is proposed. First, basic cost–benefit models are established from the perspectives of power companies and electricity users. Then, considering uncertainties in providing power with an expected number of voltage sags resulting from equipment failure and so on, proper pricing mechanisms and punitive damages of service contracts are analyzed accordingly. With each mechanism, the stochastic investment decision‐making model is formulated with the goal of maximizing a power company's economic profit during the life cycle of voltage‐sag‐preventing equipment. The influences of different factors on the economic benefits of the investment are analyzed in a case study, including the compensation coefficient, investment cost, and failure uncertainties, providing a reference for decision‐making for investment in and possible pricing of custom VS services. © 2019 Institute of Electrical Engineers of Japan. Published by John Wiley & Sons, Inc.