When considering the cost of production or offering a service we need to take into account more than just the cost to the company. There are wider costs that affect society such as air polltion that are not accounted for on the price.
Private costs: these are the costs to individuals of consuming a product, often the monetary value, but sometimes a health cost such as smoking. They are also the costs to a firm (fixed and variable costs) of production.
Private benefits: the benefit to an individual from consuming a product, often satisfaction, more knowledge etc. In the case of a firm these are likely to be the profits that are made.
External costs: the costs of production or consumption of an item to a third party - litter, air pollution, water pollution are examples, these are often called externalities.
External benefits: the benefits of production or consumption to a third party - other firms & society may benefit from the skills that workers learn through their jobs such as first aid, it skills etc.
To establish the total cost or benefit to society the total value of the private costs and eternal costs needs to be calculated. The sum of the private and external benefits need to be calculated. If the social cost is greater than the social benefit then the resources & factors of production should be used ot produce something else that is more socially beneficial.