If u have 100k in gains Only 50k is taxable If your marginal rate is 20% You owe $10k in taxes in total on the 100k gain