This article discusses the effect of external cost and external benefit on resource allocation in economics. It explains how external cost leads to inefficiency in the market, as well as how external benefits result in an insufficient quantity of goods. It also explores the reasons why private markets are unable to supply certain goods efficiently and the need for government intervention. The article further examines the concepts of private goods and public goods and provides examples for each. Additionally, it discusses price elasticity of demand and its impact on total revenue. The article also covers the concepts of allocative efficiency under perfect competition and monopoly, as well as the long-run equilibrium in a perfectly competitive market. Finally, it analyzes the effects of various factors on the demand and supply of margarine.