In: Economics
Comparative advantage is the simply the best you can do by giving up the least.
Suppose you are a good software engineer and babysitter than anyone in the neighborhood. Software engineering can help you earn $100 per hour. You are good at babysitting and can earn $20 per hour.
Now the opportunity cost of babysitting is $1000 foregone . The opportunity cost of doing software engineering work is $20 foregone as a babysitter.
You will choose that job which has less opportunity cost i.e. software engineering.
You have a comparative advantage in SOFTWARE ENGINEERING..
This concept of comparative advantage is applied to countries during trade.
Oil producing countries like Saudi Arabia, Kuwait have a comparative advantage in producing chemicals as they have a rich source of oil. They can produce chemicals at a lower opportunity cost than any other country.
If it helps kindly upvote
For doubts comment below.