What is Opportunity Cost? Suppose you have 2 activities, A and B. Doing activity A gives a return of 100 dollars, doing activity B gives a return of -50 dollars. What would be the opportunity cost of choosing activity B? 100 dollars or 150 dollars.

Oxford American Dictionary gives a pretty standard definition of opportunity cost: "the loss of potential gain from other alternatives when one alternative is chosen".

Looking at it one way, the loss of potential gain by picking B is 100 dollars, as that is the gain that would be had from doing A. However, by choosing B, not only are you missing out on 100 dollars, you're also losing 50 dollars by doing B itself. The difference in the gain between the two activities is 100 - - 50 = 150 dollars. This is the foregone value when activity B is chosen, and seems to give the full picture as to what is lost by choosing B. This term "The value foregone.." seems to appear in many definitions of opportunity cost online as well.

Different sites and sources seem to fall on either one side or the other. There are example questions and solutions online which show both methods of approach.

So, in an assignment which requires calculations of opportunity cost, which definition of opportunity cost will get me the marks- the value of the next best alternative, or the difference between the value of the next best alternative and the value of the chosen activity? Or both?
Definition. The opportunity cost (OC) of any alternative is the value you place on the best of the forgone alternatives.

If we adopt the above definition (and I do), the OC of $B$ is the value of $A$, which is simply $\$100$. 

With the above definition, the alternative you choose ($B$ in this case) is completely irrelevant when calculating its OC. All that matters is the best of the forgone alternatives.

To illustrate this point, consider this pair of examples:


  Example #1. $A$ and $B$ are the only two alternatives. $A$: "Pay $\$500$ to get back $\$600$ in return." $B$: "Pay $\$500$ to get back $\$450$ in return." The OC of $B$ is the value of $A$, which is $\$100$.
  
  Example #2. Everything is exactly the same as before, except that now $B$ is changed to "Pay $\$500$ to get back $\$1,000$ in return." The OC of $B$ is again the value of $A$, which is $\$100$.


In the above examples, the value of $B$ changes (from $-\$50$ to $\$500$) but that of $A$ doesn't. And so, the OC of $B$ is $\$100$ in both examples. 

An alternative's value is completely irrelevant to its OC. What's relevant is the value of the best alternative forgone.



Notes. "What exactly is OC?"

This seemingly-simple question was discussed in the past (see e.g. Alchian, 1968). Then like many of the most important questions in economics, it was then forgotten/glossed over until Ferraro &amp; Taylor (2005) and the susbequent literature spawned (see in particular the 2016 JEE Symposium).

It all boils down to which definition you use. My view (and I believe also that of Alchian and Buchanan, 1987) is that the above definition is the "most correct" one that "everyone should use". Of course, whoever's marking your homework may disagree.