The opportunity cost of something is what you give up to get it. Economics is all about opportunity costs, that is, trade-offs that individuals face in their decision making. Opportunity costs can be factored into the cost of making a decision.
To touch on one of the most common examples, let's look at the opportunity cost of college. Say you are deciding between attending a 4 year college that costs $20,000 a year, or taking a job that pays you $25,000 a year. The economic cost of attending college will be:
Cost of college: 4 x $20,000 = $80,000
Foregone earnings (opportunity cost): 4 x $25,000 = $100,000
Total cost: $180,000
Now, you will note that this is the economic cost of attending college. Economic costs include the opportunity cost. If you hadn't gone to school, you could have make that $100,000 during the 4 years. However, because you went to college, your job pays you more - $50,000 a year. Within a few years, the cost of attending college will have payed off. Let's see how much better off you are in 12 years:
College You:
Total costs: $80,000
Total earnings: 8 x $50,000 = $400,000
Total money: $320,000
Non-college You:
Total costs: $0
Total earnings: 12 x $25,000 = $300,000
Total money = $300,000
12 Years after starting college meant you only worked 8 years, while the non-college you worked 12. However, because of your education you still come out on top. It looks like you should attend college.
Opportunity costs are important in making decisions in both economics and life. Calculating opportunity cost when making decisions allows one to account for what they could be giving up by choosing one way or another.