Skip to content

From the plan to your tax return, step by step

The company is bought and my shares are paid for: how much does Hacienda take?

Most of the price is a capital gain; the part that depends on your staying is salary; and the deferred part can be spread over the years in which you are paid.

What cost is deducted when your shares are bought

To know how much the tax office takes on a sale, you need to know what cost is deducted. The sample report works it out: the exercise price plus the spread already taxed, so that amount does not pay twice, with the difference going to the savings base. It also covers deferred payments. An options case from this firm, twelve pages in Spanish, no names.

PDF · 12 pages · 235 KB · no client data of any kind

It is one case, not a template. What it concludes holds for that plan and that residence history. What it does show is the order of the reasoning (facts, characterisation, figures, risks), and that part you can take with you.

RSUs in Spain. Worth saying plainly: RSUs are not recognised as such under Spanish law. They are fitted into employment income in kind and, where it applies, into the relief for income generated over several years, but the fit depends on each plan and on where you were resident while the units vested. An article describes the usual road; yours may run elsewhere.

Have my case looked at

Petra Horvat is Croatian and has lived in Barcelona since 2018. She was one of the first employees of a Barcelona limited company making software for restaurants. She holds 5,000 shares: she bought 3,000 of them in 2019 at 1 € each, the same price the founders paid at the time, and obtained 2,000 in 2023 by exercising options at a price of 2 € when the share was worth 12 €; on those she was taxed on employment income of 20,000 €. Now a European group is buying 100 % of the company at 40 € per share. But the agreement does not pay everything at once: 70 % at closing, 20 % within twenty-four months and the remaining 10 % only if Petra keeps working at the company for two more years. Petra wants to know how much of those 200,000 € is capital gain, how much is salary and in which year each part is taxed.

First: what are you selling?

In this transaction Petra sells shares she owns. These are not options being settled or RSUs being accelerated, cases we deal with in the company is being sold: what happens to my equity. When you sell securities that are already yours, the general rule is that the result is a capital gain or loss, taxed in the savings base, calculated as the difference between the transfer value and the acquisition value.

The origin of the shares does not change that classification, but it does change the acquisition value:

LotSharesHow they were obtainedAcquisition value per share
20193,000Purchase at market price1 €
20232,000Exercise of options2 € paid + 10 € already taxed as employment income = 12 €

If Petra forgot to add the 10 € already taxed as employment income on exercise, she would pay twice on the same income. The mechanism is in when my stock options are taxed.

A price conditional on staying is not price

The 10 % that Petra will only receive if she stays with the company for two years does not depend on the shares she is selling, but on her future work. Shareholders who do not work at the company, or who leave, do not receive it. That brings it close to a retention payment, and the most prudent classification is employment income, allocated when it becomes payable, that is, when the condition is met. It is a point that can be argued depending on the wording of the agreement, and it should not be treated as price without analysing it.

One practical consequence of that classification: the 20,000 € will go to the general base and not to the savings base. Could they qualify for the 30 % reduction? The law reserves it for income with a generation period of more than two years. If the condition is to stay exactly two years from closing, the period does not exceed that threshold and the reduction does not seem to apply. If the agreement set a longer period, it would have to be studied under the rules explained in the 30 % reduction.

Petra's calculation, step by step

  1. Total notional price: 5,000 × 40 = 200,000 €.
  2. Part conditional on staying (10 %): 20,000 €, treated as employment income when payable.
  3. Price of the shares: 180,000 €, that is, 36 € per share, of which 140,000 € is received at closing and 40,000 € at twenty-four months.
  4. Acquisition value: 3,000 × 1 + 2,000 × 12 = 27,000 €.
  5. Total capital gain: 180,000 − 27,000 = 153,000 €, less the costs of sale borne by Petra.

The deferred payment: two ways of allocating it

As a general rule, the gain is allocated to the year in which the change in assets occurs, that is, the year of sale. But article 14.2.d) of the Spanish Income Tax Act allows, in transactions with a deferred price, the income to be allocated proportionally as the payments become due, provided more than a year passes between the transfer and the due date of the last instalment. Petra's transaction meets that condition, because the last payment falls due at twenty-four months.

If Petra opts for proportional allocation:

  1. Proportion received at closing: 140,000 / 180,000.
  2. Gain allocated to the year of closing: 153,000 × 140 / 180 = 119,000 €.
  3. Gain allocated to the year of the deferred payment: 153,000 × 40 / 180 = 34,000 €.
YearCapital gainEmployment income
Year of closing119,000 € (or 153,000 € if she does not opt for proportional allocation)None from this transaction
Two years later34,000 € if she opted for proportional allocation20,000 €, if she is still with the company and the condition is met

Spreading the gain over two years can soften the effect of the savings scale and avoids paying tax on money not yet received. The drawback is that, if the buyer does not pay the deferred amount, Petra will have to deal with that default under its own rules.

A sellers' escrow is not just any deferred payment

If part of the price is held in escrow as security for the representations in the agreement, its treatment depends on whether it is regarded as a fixed deferred price or a price subject to a condition. If the buyer later keeps part of it because of a claim, the gain will have to be adjusted. The answer depends on the specific clause and we cannot guarantee what view Hacienda, as the Spanish tax office is commonly called, will take.

What happens if the deferred amount never arrives

If the buyer does not pay the 40,000 € when due, Petra will already have been taxed on a gain calculated with a price she did not receive, unless she opted for proportional allocation, which in that case protects her in part. That is another argument for choosing allocation as payments become due when the deferred amount is significant.

Other clauses worth reading

Price adjustments. Many agreements adjust the price according to debt or working capital at closing. If the final price goes down, the gain goes down; if you have already filed with the provisional price, a correction may be needed.

Earn-out for the sellers. If part of the price depends on the company's future results and not on your staying, it is still price for the shares, albeit uncertain.

Non-compete covenants. If the agreement pays Petra a specific sum for not competing, that sum is not price for the shares and needs its own analysis.

You can send us the purchase agreement, or at least the summary of terms for the sellers, through the equity form so that we can separate what is price, what is employment income and what is allocated to each year.

If you are under the Beckham regime or leaving Spain

Anyone taxed under the article 93 regime does not pay tax in Spain on the sale of shares in foreign companies, but does on the sale of shares in a company resident in Spain, like Petra's, because that gain is treated as obtained in Spanish territory. See the Beckham regime and shares. And if Petra ceased to be resident before receiving the deferred amount, the change of residence may require pending income to be included in her last return as a resident; it is worth analysing before moving.

Employee share sales in an acquisition have their own place on the Salama Tax page on equity, where we explain which clauses of the agreement change the classification of what you receive.

Your share plans, with the price closed first

You know what it costs before we start.

Start here
Book a callWhatsApp