Opportunity cost is the profit that was lost because of some action.
To illustrate opportunity cost, let's assume that you want to add a website to your already successful business. You are confident that it will increase your company's profit by $1,500 each week. A highly-trusted and successful firm will complete the website in 3 weeks at a cost of $10,000. Your friend has offered to do the work for $6,500 and expects it will take 5 weeks.
If you select your friend, there will be an opportunity cost of $3,000 since you will lose the opportunity to earn $1,500 per week for 2 weeks (friend's 5 weeks vs. firm's 3 weeks).
Now let's assume that you have selected your friend, but it actually takes your friend 7 weeks. This means that you lost the opportunity to earn the additional $1,500 per week for 4 weeks (friend's 7 weeks vs. firm's 3 weeks) for a total opportunity cost of $6,000. This opportunity cost reveals that you would have been wiser to have paid the trusted firm $10,000 instead of paying your friend $6,500. The payment difference of $3,500 is less than the opportunity cost of $6,000 (4 weeks of lost profit at $1,500 per week).
[Hence, you would have been better off by $2,500 ($3,500 of additional cash paid vs. the $6,000 of additional profits received) if you had selected the trusted firm.]
Interestingly, the opportunity cost is not recorded in the general ledger accounts. Hence, only the $6,500 paid to your friend will be recorded as the cost of the website (even though your friend has cost you an additional $6,000 of lost profit).
This is also a reminder that the opportunity costs and future amounts are the important ones for making decisions. Unfortunately, the future amounts are not in the general ledger and are probably not known at the time a decision has to be made.