How to calculate your tax base as an expat freelancer in Spain

James McKenna
Written by James McKenna
on julio 12, 2023 8 min of reading

Calculating your tax base: Yet another bit of jargon that you’ve got to understand as an expat freelancer in Spain. But don’t worry, you're not alone! At Xolo, we understand how challenging it can be to stay on top of freelance accounting and taxes, and we’re here to help.

Today, we're going to give you a full explanation of one of those concepts you’ve probably heard of, but you’re not quite sure what it is: your tax base. And if that doesn't ring a bell… Well, it should. 

Understanding your tax base is Freelancing 101 and a necessary part of every invoice you issue. It will also help you invoice correctly and avoid any unpleasant surprises from the Tax Agency (surprises = penalties). 

Anyway, the concept isn’t too difficult, and we’re sure you’ll be a master by the end of this article. But before we dive into the complex stuff, let’s take a look at some of the language you’ll come across once you start living and working in Spain.

A Spanish to English glossary for tax bases

New freelancers in Spain often have a good grasp of the tax base concept, but spend all their time trying to mentally translate the convoluted language in Spanish admin documents. That’s why we’ve put together a quick glossary so you can understand the most common words and phrases related to taxable income.

  • Base imponible — tax base
  • Base liquidable — tax base after specific deductions
  • Impuesto sobre la renta de las personas físicas (IRPF) — personal Income tax
  • Impuesto al valor agregado (IVA) — value-added tax (VAT)
  • Declaración de la renta — annual income tax return
  • Agencia Tributaria — the Spanish tax agency

What’s a tax base? 

In simple terms, a tax base is any amount of money that can be taxed, such as capital gains, property, and sales. But the most common tax base for expat freelancers in Spain is the one you include on your client invoices. In this context, your tax base is essentially your taxable income.

All of this sounds a little tricky, but it’s honestly easier than you’d think. Part of the confusion comes from Spain’s passion for using complex legalese. The term “base imponible” translates as “tax base”. However, on an invoice, you’ll recognize it as a sub-total — the amount you charge for your services before applying tax. 

In English, we can also say “taxable base”, but to keep things simple, we’ll stick to “tax base” for this article.

How do you apply your tax base to an invoice?

Let’s say you've created a website valued at €1,000. When you write up your invoice, that €1,000 is the quote you send to your client, your sub-total, and your tax base — all the same thing. 

After your tax base, you will need to calculate and apply the percentage of income tax retention (IRPF) of your €1,000. Your client will send this to the tax agency on your behalf, so logically, you don’t receive it. IRPF is almost always 15%, except for reduced rates for new freelancers.

You might be interested in: IRPF for freelancers

After your income tax retention, you’ll include the corresponding percentage of VAT (IVA in Spanish). IVA is generally 21%, but some activities are exempt and others take a reduced rate. Remember that this is 21% of your tax base itself, not of your tax base minus income tax.

You might be interested in: VAT for freelancers

Just a quick note for the newbies: Following this example, you will quote €1,000 to your client. It might feel strange quoting one number when you know the total payable will be different, but it’s exactly what your clients will expect. 

How different taxes use tax bases

Each kind of tax works with a different tax base.

  • For VAT (IVA), the tax base is the cost of the products or services you consume.
  • For personal income tax (IRPF), the tax base is the total income earned by an individual during a fiscal year. 
  • For corporation tax (IS), the tax base is the profit made by a company in a fiscal year.

How to calculate your tax base on an invoice 

On an invoice, your tax base is usually calculated by adding up the unit price of each product or service you provided. As we mentioned before, it is your sub-total and the amount before taxes. Underneath your tax base, you’ll apply taxes before providing the total payable amount.

In your case, as a freelancer, the most common formula you would have to apply is: 


Taking up the earlier example, here's how it would look on an invoice: 



Corporate website creation


SUBTOTAL (your tax base)


IVA (+21%)


IRPF (-15%)





When you issue invoices, we recommend that the tax base is clearly detailed so your client knows exactly how much they're paying before taxes are applied.

Let’s take a look from another perspective 👀. Sometimes working backward helps you understand something forward.  

So, you’ve got a total payable amount and you want to know the tax base. There’s a calculation for that, and learning this calculation will be really useful, especially when: 

  1. You’ve agreed to charge your client a total payable amount, rather than your standard rate. This means all your taxes and retentions are included. But to stay compliant with the tax authorities, you still need to calculate what the tax base would be to create a legit invoice. 
  2. You receive an invoice from a supplier that only shows the final amount (boo you supplier) and you need to work out the tax base so the tax agency doesn’t come hunting you down. 

So whether your unconventional invoice only includes VAT, income tax, or both, you can work backward to stay compliant. 

How to calculate the tax base of an invoice that includes only VAT (IVA)

If you’ve got an invoice with IVA, calculating the tax base is as easy as dividing the total amount of the invoice by 1 + %IVA / 100.

Still not fully clear? Maybe this table will help.


Total / (1+21/100)

Total / 1.21


Total / (1+10/100)

Total / 1.10


Total / (1+4/100)

Total / 1.04


In context, if you pay €1,210 for a social media content schedule, just divide €1,210 / 1.21 to get the tax base. In this case, a neat €1,000. 

In other words, your provider is charging you €1,000 before tax, meaning the remaining €210 goes to the tax man as IVA.

How to calculate the tax base of an invoice that includes only income tax (IRPF) 

Back to IRPF, or personal income tax. 

It is a little confusing that you apply a 15% income tax retention to all your invoices to Spanish clients (not to internationals, more on that here!), but your tax base is calculated from all your income earned over a year.

Let’s clear that up.

The actual percentage of tax you’ll pay on your earnings will be more than 15% 😞. The lowest tax bracket is already 19%. 

So why 15%? 

It’s basically an IOU to the tax man. A portion of your annual tax return that you pay in advance so the government knows you’re good for it. Sure, this means there can be some surprises when it comes to filing your tax returns, but it’s actually easier than changing your rate on every invoice. Plus they’re the rules so there’s not much you can do about it 😛. 

There is also a reduced 7% IRPF rate for brand-new freelancers (and if you're reading this, that’s probably you!). But just like the more experienced among us, you’ll have to pay the true amount in your annual tax return, so it’s more of a deferral than a discount.

Remember that the IRPF retention is not an additional tax for your clients. It’s simply a deduction of the total payable that your client pays on your behalf in income tax!

To calculate the tax base on an invoice with an IRPF retention, divide the total amount by 1 - %IRPF / 100.


Total / (1-15/100)

Total / 0.85


Total / (1-7/100)

Total / 0.93

How to calculate the tax base of an invoice that includes both VAT and income tax 

What if we have an invoice with both VAT and income tax? This is the most common scenario for freelancers in Spain. You might already have guessed the formula here. But pride comes before a fall, so maybe pay attention just in case. 

Imagine the total amount you want the client to pay for the website is €1,000 (not the €1,140 we used before as the total amount). To keep the tax man happy, you'll first have to calculate the tax base and apply the following taxes and retentions after.

  1. 21% IVA. 
  2. - 15% IRPF retention. 

In this case, the way to calculate the tax base on an invoice would be by dividing the total amount by 1 + (%IVA - %IRPF) / 100. 

+IVA (21%) -IRPF (15%)

Total / [ 1 + (21-15)/100 ]

Total / 1.06

+IVA (21%) -IRPF (7%)

Total / [ 1 + (21-7)/100 ]

Total / 1.14


So if you want the final price for the client to be €1,000, divide €1,000 / 1.14 to negate your taxes and get your tax base. In this case, €877.19.

This is what your invoice would look like:



Corporate website creation


SUBTOTAL (your tax base)


IVA (+21%)


IRPF (-7%)




Differences between the base imponible and the base liquidable

As we previously mentioned, the base imponible is your tax base and we’ve gone over that in enough detail. But we also mentioned that Spaniards love a bit of convoluted language. Enter the base liquidable. Finding a direct translation is pretty tricky because the concept isn’t used globally, so we’re going to stick to the Spanish terms here — that’s what you’ll come across anyway. 

Your base liquidable is your base imponible minus certain reductions, meaning you pay less in tax. We’re not referring to business-related expenses here, though. The reductions that affect your base liquidable are usually related to things like maternity, child care, and disability.

If this is your case, take those reductions away from your base imponible and use the resulting base liquidable to calculate your income tax.

Common problems for expat freelancers around tax bases

To help you avoid typical pitfalls related to tax bases, we’ve got a brief list of things to watch out for.

  • Assuming you’re up-to-date on income tax. When your Spanish clients pay income tax on your behalf, remember that 15% is less than you should be paying. Keep some savings aside for your quarterly and annual tax returns
  • Spending your clients’ VAT. Your clients pay you 21% of your tax base in VAT. But that’s not for you, it’s for the government, so don’t spend it!
  • Believing providers are quoting the total payable. Just like you offer a pre-tax quote, any providers who work for you will add taxes onto their quote, which often feels like you’re being charged more than you were promised.
  • Using the base imponible and base liquidable interchangeably. Using these two terms as if they are the same thing can lead you to get your tax returns wrong, which usually ends up in you paying more tax than you should.
  • Messing up your mathematics. You can’t rely on your clients to correct errors on your invoices. If you make mistakes in your VAT and income tax calculations, you could run into serious problems with the tax agency. If only there was an easy-to-use online platform with automated invoice creation and a team of experts to help you out 🤔.

Simplify your taxes with Xolo

At Xolo, we adapt to modern life. While other freelancers are messing around with shaky Google Sheet formulas, you can rest easy that your invoices will come out looking professional and error-free. Our automated accounting platform instantly adds VAT and IRPF based on your activity and client, saving you time and pressure every month.

✅ Sleek, compliant invoices

✅ From anywhere 

✅ At any time

Sign up for Xolo today and join our booming community of freelancers who have decided to make life easy.

Still not sure? Book a call with one of our experts for more detail on what we offer.

New call-to-action

About James

James McKenna has been a freelancer since 2017, working in subtitling, translation, and his main passion — writing. He loves nothing more than falling down a rabbit hole, a habit that has helped him specialize in areas as diverse as biotech, climate change, higher education, and business strategy.

Based in Barcelona, James learned the ropes the hard way, making mistakes that turned into valuable learning experiences. After working hard to establish himself, he is now working smart, and is always on the lookout for ways to streamline his business.

Table of contents

    Need help with your freelancer taxes in Spain?

    Xolo can help