Suppose a certain good provides an external benefit. If the private cost of the last unit of the good that was produced is equal to the social value of that unit, then the sum of producer and consumer surplus is maximized.