LAFAYETTE, Calif. — It was only two years ago that Elroy Holtmann spent about $20,000 on a home solar array to help cover the costs of charging his new electric car. With the savings on his monthly electric bills, he figured the investment would pay for itself in about a dozen years.

But then the utilities regulators changed the equation.

As a result, Pacific Gas & Electric recently did away with the rate schedule chosen by Mr. Holtmann, a retired electrical engineer, and many other solar customers in this part of California. The new schedule will make them pay much more for the electricity they draw from the grid in the evening, while paying those customers less for the excess power their solar panels send back to the grid on sunny summer days.

As a result, Mr. Holtmann’s solar setup may never pay for itself.

“They’ve taken any possibility for payback away,” he said with resignation, looking up at the roof of his 1970s ranch-style house in this suburb a short drive east of Berkeley.

The paradox is playing out around the country. Even as policy makers at the federal and state levels promote clean energy to fight global warming, the economics of electricity can often be at odds with those goals.