Personal Income Tax (IRPF) is the tax levied on the annual income of people resident in Spain, and most employees pay it throughout the year through withholdings deducted from their payslip. From a salary, this calculator does two things: it estimates the annual income tax bill using the state scale and the Community of Madrid regional scale with their personal and family allowances, and it works out the payroll withholding rate using the Tax Agency's (AEAT) general procedure. Comparing the two tells you whether your return is likely to show an amount to pay or a refund. Below we explain step by step how those figures are reached and which factors change them.
What IRPF is and how withholding works
IRPF is a personal, progressive tax: the higher your income, the higher the rate applied to each additional band of earnings. It is partly devolved to the autonomous communities, so the final tax bill is the sum of a state portion and a regional portion, each with its own scale.
The withholding shown on your payslip is a payment on account. Your employer calculates it using the information you provide on Form 145 and pays it to the Tax Agency monthly or quarterly. The following year, in your tax return, the tax actually due is compared with what was withheld: if too much was withheld, the Tax Agency refunds the difference; if too little, you pay the balance.
How it is calculated: from gross income to net tax liability
The annual tax calculation follows a fixed sequence, which the tool reproduces in simplified form for a taxpayer with employment income only (no other income, regional tax credits or pension plans). It is worth understanding each step, because that is usually where differences arise between the estimate and the final figure on your return.
- Gross employment income: annual gross salary, including extra payments and benefits in kind.
- Deductible expenses: mainly the employee's Social Security contributions plus a flat 2,000 euros for other expenses.
- Employment income reduction (article 20 of the IRPF Act): designed for lower earners, it is highest for the smallest net incomes and tapers off until it disappears as salary rises.
- Taxable base: the previous result, reduced where applicable by court-ordered maintenance paid to a former spouse and, if joint filing is chosen, by its reduction (3,400 euros for a married couple where the spouse has no income, or 2,150 euros for single-parent families). Pension plan contributions also reduce the base, although the calculator does not include them.
- Gross tax liability: two progressive scales, the state one and the regional one, are applied band by band to the taxable base and the results are added together.
- Tax on the personal and family allowance: each scale is applied to the allowance (the state allowance on the state scale and the regional allowance on the regional scale) and the result is subtracted from the corresponding gross liability.
- Net tax liability: what remains after also subtracting any applicable tax credits; the calculator applies the employment income credit of additional provision 61 for salaries around the minimum wage. Divided by gross annual pay it gives the effective rate. Separately, the tool calculates withholding with the procedure in articles 82 to 86 of the Regulations and subtracts it from the liability to estimate the outcome of your return.
Tax scale and personal and family allowances in 2026
The calculator uses the general state scale and the Community of Madrid regional scale to estimate the annual liability. State rates are 9.5% up to 12,450 euros, 12% up to 20,200 euros, 15% up to 35,200 euros, 18.5% up to 60,000 euros, 22.5% up to 300,000 euros and 24.5% above that; Madrid's regional rates range from 8.5% to 20.5%, somewhat below those of other regions. For payroll withholding, by contrast, it uses the single withholding scale (19%, 24%, 30%, 37%, 45% and 47% over the same bands as the state scale), which is the same throughout the common territory and does not depend on the region. Each autonomous community sets its own regional scale, so outside Madrid the real liability can differ, while the foral territories of the Basque Country and Navarre have their own income tax with different bands.
The current state allowances reduce the tax due according to personal circumstances (the Community of Madrid applies somewhat higher amounts in its regional portion, for example a 5,956.65 euro taxpayer allowance):
- Taxpayer allowance: 5,550 euros, increased by 1,150 euros from age 65 and by a further 1,400 euros from age 75.
- Children under 25 or with a disability living with the taxpayer: 2,400 euros for the first, 2,700 for the second, 4,000 for the third and 4,500 for the fourth and subsequent children, plus 2,800 euros for each child under 3. With shared custody it is split between both parents.
- Ascendants over 65 or with a disability who live with the taxpayer for at least half the year and have income below 8,000 euros: 1,150 euros, plus 1,400 euros if they are over 75.
- Disability: 3,000 euros for a degree of 33% or more, 9,000 euros for 65% or more, and an additional 3,000 euros for care costs where third-party assistance is needed or mobility is reduced.
Worked example
Take a single employee with no children living in the Community of Madrid, on a permanent contract and earning a gross salary of 30,000 euros. After deducting 1,950 euros of Social Security contributions (the employee's 6.50%) and the 2,000 euros for other expenses, net employment income is 26,050 euros; at this income level the article 20 reduction no longer applies, so that figure is also the taxable base.
Applying the state scale, gross state liability is 2,990.25 euros and the tax on the personal allowance (5,550 euros) is 527.25 euros, leaving 2,463 euros. With Madrid's regional scale and allowance (5,956.65 euros), the regional liability is 2,641.33 euros minus 506.32 euros, i.e. 2,135.02 euros. The estimated annual net liability comes to 4,598.02 euros, an effective rate of around 15.3% of gross pay. Withholding, calculated with the withholding scale (5,980.50 euros of tax minus 1,054.50 euros on the allowance), comes out at 16.42%, about 4,926 euros a year, so the return would show a refund of roughly 328 euros.
If the same person had two children under 25, the state allowance would rise by 5,100 euros and the annual liability would fall to about 3,648 euros, almost 950 euros less; withholding would drop to 13.19%. This shows why two people on the same salary can have very different withholding rates.
Common mistakes and key dates
The most frequent mistake is failing to update Form 145 when family circumstances change: a birth, a separation or a parent moving in all alter the correct withholding. Another is confusing the marginal rate with the effective rate; falling into the 30% band does not mean paying 30% of your whole salary, only of the part of the taxable base above 20,200 euros.
Changing jobs or having two payers in the same year also causes surprises, because each employer withholds without knowing about the other's payments, so the return often ends up with tax to pay. As a general rule, you must file a return if you earn more than 22,000 euros a year from a single payer, or 15,876 euros if there is more than one and the second and subsequent payers together exceed 1,500 euros. The filing campaign normally runs from early April to 30 June of the year following the tax year.