I read a lot of places where it takes the following steps to calculate unrealized gain/losses:
step1: Multiply the price you paid per share by the number of shares purchased to calculate your cost for the stock.
step2: Multiply the current price by the number of shares you own to figure the current value of the stock.
step3: Subtract your cost from the current value to figure your unrealized gain.
However, what if you sold some crypto, then how would you deduct that sold amount into the unrealized gain/loss equation? Below is my example, for simplicity, not going to include fees:
date | trade | amount | settled_price | balance |
---|---|---|---|---|
1/1 | buy | 1 | 40k | 1 |
1/2 | buy | 1 | 41k | 2 |
1/3 | sell | 0.5 | 42k | 1.5 |
1/4 | buy | 1 | 43k | 2.5 |
so, what is the unrealized gain/loss of this example on 1/4?