You calculate the Gain of €40,000.
This is my understanding of the calculation:
If you transfer €100,000 (all of the proceeds), you would be taxable on the full profit in the year that you make the transfer of the funds.
If you transfer €50,000 (half of the proceeds), you would be taxable on half of the profits (€20,000) in the year that you make the transfer of the funds.
Of course, if you transfer these funds from a bank account that also holds interest etc, this complicates that calculation.