I am simultaneously selling my principal residence and a garden as building land. Am I exempt from capital gains tax on the entire transaction?

No. The law provides that “where land constituting a dependency of the principal residence is sold as building land, the exemption [from capital gains tax] does not apply” (BOI-RFPI-PVI-10-40-10, § 340).

Reminder: Capital gains tax is calculated on the difference between the acquisition price and the sale price of real estate. The sale of a principal residence is exempt (Art. 150 U II CGI). This exemption extends to “immediate and necessary dependencies” of the principal residence (such as a garage).