We introduce NEM X, an inclusive retail tariff model that captures features of existing net energy metering (NEM) policies. It is shown that the optimal prosumer decision under NEM X obeys by a two-threshold policy. The threshold policy yields three household consumption modes: (a) the net-consuming mode where the prosumer consumes more than its behind-the-meter distributed energy resource (DER) production when the DER production is below a predetermined lower threshold, (b) the net-producing mode where the prosumer consumes less than its DER production when the DER production is above a predetermined upper threshold, and (c) the net-zero energy mode where the prosumer’s consumption matches its DER generation when its DER production is between the lower and upper thresholds. Both the thresholds are obtained in closed-form and computed apriori. Next, we analyze the regulator’s rate-setting process that determines NEM X parameters such as retail/sell rates, fixed charges, and price differentials in time-of-use tariffs’ on and off-peak periods. A stochastic Ramsey pricing program that maximizes social welfare subject to the revenue break-even constraint for the regulated utility is formulated. Performance of several NEM X policies is evaluated using real and synthetic data to illuminate impacts of NEM policy designs on social welfare, cross-subsidies of prosumers by consumers, and payback time of DER investments that affect long-run DER adoptions.