A capital gains tax is levied on the profit realized from selling an asset that has appreciated in value. It…