Externalities, or consequences of an economic activity, lead to market failure because a product or service's price equilibrium does not accurately reflect the true costs and benefits of that product or service. Equilibrium, which represents the ideal balance between buyers' benefits and producers' costs, is supposed to result in the optimal level of production. However, the equilibrium level is flawed when there are significant externalities, creating incentives that drive individual actors to make decisions which end up making the group worse off. This is known as a market failure.

When negative externalities are present, it means that the producer does not bear all costs, resulting in excess production. With positive externalities, the buyer does not get all the benefits of the good, resulting in decreased production. An example of a negative externality is a factory that produces widgets but pollutes the environment in the process. The cost of the pollution is not borne by the factory, but instead shared by society.

If the negative externality is taken into account, then the cost of the widget would be higher. This would result in decreased production and a more efficient equilibrium. In this case, the market failure would be too much production and a price that didn't match the true cost of production, as well as high levels of pollution.

An example of a positive externality would be education. Obviously, the person being educated benefits and pays for this cost. However, there are positive externalities beyond the person being educated, such as a more intelligent and knowledgeable citizenry, increased tax revenues (from better-paying jobs), less crime and more stability. All of these factors positively correlate with education levels. These benefits to society are not accounted for when the consumer is considering the benefits of education.

Therefore, education would be underconsumed relative to its equilibrium level if these benefits are taken into account. Clearly, public policymakers should look to subsidize those markets with positive externalities and punish those with negative externalities.

One obstacle for policymakers, though, is the difficulty of quantifying externalities to increase or decrease consumption or production. In the case of pollution, policymakers have tried tools, including mandates, incentives, penalties and taxes, that would result in increased costs of production for companies that pollute. For education, policymakers have looked to increase consumption with subsidies, access to credit and public education.

In addition to positive and negative externalities, some other reasons for market failure include a lack of public goods, underprovision of goods, overly harsh penalties and monopolies (see also "How Does a Monopoly Contribute to Market Failure?"). Markets are the most efficient way to allocate resources with the assumption that all costs and benefits are accounted into price. When this is not the case, significant costs are inflicted upon society, as there will be underproduction or overproduction.

Being cognizant of externalities is one important step in combating market failure. While price discovery and resource allocation mechanisms of markets need to be respected, market equilibrium is a balance between costs and benefits to the producer and consumer. It does not take third parties into effect. Thus, it is the policymakers' responsibility to adjust costs and benefits in an optimal way.