Descodify is invitation-only and opens to new users in January 2027. Read your IRS declaration free, no sign-up needed →
descodify
← Back to blog
For freelancers

CAE vs CIRS Portugal: What Activity Code Do You Actually Need as a Programmer?

By Mikael

The search query "CAE 1332 Portugal" returns a mix of results, none of which clearly explains the problem: there is no CAE registration code 1332: CAE registration uses five-digit subclasses. The code you're looking for is CIRS 1332, from a separate classification system.

That confusion is the starting point for everything else in this post. Because if you don't understand the difference between CAE and CIRS, you can't understand your own registration, your tax coefficient, or why your obligations are different from what the standard Portuguese freelancer guides describe.

Two systems with one shared purpose

CAE (Classificacao Portuguesa de Atividades Economicas) is Portugal's classification of economic activities. The current version, CAE-Rev.4, was approved by Decreto-Lei 9/2025 and is aligned with the EU's NACE classification. Companies register under it, and so do sole traders whose activity is commercial, industrial or agricultural.

The Art. 151 table is the list of professional activities that Art. 151 of the Codigo do IRS points to. Art. 151 itself holds no table: the list is Annex I of a Ministry of Finance portaria, Portaria 1011/2001, and AT (Autoridade Tributaria e Aduaneira) publishes it. It is where individual independent professionals, the people Portugal calls trabalhadores independentes who issue Recibos Verdes, find their activity code when they open their activity at the Portal das Financas.

A freelance programmer can carry both: the Art. 151 code for the professional activity, and a CAE beside it. As a registration code, 1332 belongs to the Art. 151 table: CAE registration uses five-digit subclasses.

See the CAE glossary entry for the full breakdown of both systems side by side, and the CIRS glossary entry for the broader context of what the Codigo do IRS governs and how the Art. 151 table fits into it.

What CIRS 1332 actually covers

Code 1332 in the Art. 151 table is "Programadores informaticos": programmers. That one word pair is the whole entry; the table never lists which kinds of programming work fall under it. If writing code is what you are paid for as a freelancer in Portugal, it is the code whose name matches.

Two neighbours in the same group come up regularly in the same searches: CIRS 1313 ("Analistas de sistemas," systems analysts) and 1320 ("Consultores," consultants). All three are listed by name in the table, so all three carry the 0.75 coefficient. Which one is yours depends on the work you actually do, and AT classifies on the activity actually performed, not on the code you picked. You register one principal activity and can add secondary codes for the rest.

There is also CIRS 1519 ("Outros prestadores de servicos," other service providers). It is in the table too, as the catch-all for services the table does not name. Because it names no activity, it gets the lower treatment: a 0.35 coefficient and 11.5% withholding. A programmer registering under 1519 when 1332 fits would be under-reporting taxable income. That is a misclassification, and the fix is a declaração de alterações to the right code.

The tax mechanics for CIRS 1332 freelancers

The coefficient. Under the simplified regime, 75% of your gross revenue is taxable. The other 25% is treated as assumed business costs, so you can't swap it for your actual expenses even if they were higher. It is not receipt-free, though: part of it has to be backed by documented expenses (the 15% rule below), or the shortfall is added back to your taxable income. Social Security is not a separate deduction on top either. It counts toward that 15% proof up to 10% of your gross, and only the part above that is deducted from your net income (Art. 31.º n.º 2 CIRS).

First-year discount. In your first calendar year of activity, only 37.5% of gross revenue is taxable, half the standard rate. In year two, 56.25%. This runs on calendar years, not 12 months from your start date: open your activity in March rather than October and ten months of income get the first-year rate instead of three. Year two gets its own reduction either way.

To qualify: no employment or pension income in the year in question (tested separately for each of the two years), and no activity of any kind closed in the five years before you start, whether or not it was similar (Art. 31.º n.ºs 10 and 11 CIRS).

Documented expense requirement. If your documented expenses fall short of 15% of your gross income, the shortfall is added to your taxable income. An automatic specific deduction of roughly €4,587.09 (2026) counts toward this, or your Social Security contributions up to a cap of 10% of your gross, whichever is larger. Portuguese invoices with your NIF reach AT through e-Fatura. A foreign supplier's invoice never does: an EU purchase goes in its own field on your return, and a service bought from outside the EU may not count at all. See the 15% expense rule fact page for the full mechanics.

Withholding from Portuguese clients. When a client that keeps organised accounting (any Portuguese company) pays you for professional services, it is required to withhold 23% at source and send it directly to AT, unless you claim the dispensa under Art. 101.º-B n.º 1 a) CIRS (you expect this year's income to stay below €15,000 and last year's did not reach it; you claim it with a mention on the receipt), or the amount withheld would be very small (Art. 101.º-B n.º 1 d)). Since 1 January 2025, that's the default rate (reduced from 25% by OE2025, Lei 45-A/2024, Art. 101 CIRS). You can also give them a written declaration asking for a higher whole-number rate, such as 25%, if you prefer larger advance payments (Art. 98.º n.º 6 CIRS).

Withholding from foreign clients: nothing. This is the point that catches expat developers most off guard.

When your Berlin startup client pays you €5,000, all €5,000 lands in your account. No tax has been sent to AT. The IRS liability on that income is real. Budget separately.

And it carries into later years: once your IRS is assessed, AT starts asking for advance payments (pagamentos por conta), three instalments due by the 20th of July, September and December, worked out from your assessment of two years earlier minus what your clients withheld that year. With mostly foreign clients nobody withholds, so those payments are yours to plan for.

The expat developer layer

Most guides covering CIRS 1332 are written for Portuguese programmers with Portuguese clients. If you moved from Sweden, the Netherlands, or the UK and your client base is back home or scattered across Europe, several of those guides quietly stop applying to you.

If you issue your invoices with software at all, that software must be AT-certified, whatever your turnover (DL 28/2019, Art. 4.º; Portaria 363/2010 sets what certification itself requires). Certified software assigns ATCUD codes to every document, communicates with AT systems, and generates the SAF-T audit file.

Stripe Invoicing is not AT-certified. Neither is QuickBooks, FreshBooks, Wave, or Xero. If you arrived with an existing invoicing stack from abroad, those invoices aren't valid in the Portuguese tax system. This applies to CIRS 1332 freelancers the same as everyone else.

The free fallback is the AT's own invoicing service on the Portal das Financas ("Faturas e Recibos Verdes"), which costs nothing. It issues Portuguese-language documents only, whatever the interface language, and it can issue a credit note (nota de crédito) when an amount or the VAT of an invoice changes; cancellation (anulação) is kept for narrower errors such as a wrong customer NIF. For more on the certification landscape and what to look for, see the expat freelancer tax automation guide.

Invoicing EU clients: 0% VAT, but not zero obligations

When you invoice a business client in another EU country, the service is not taxed in Portugal at all (Art. 6.º n.º 6 a) CIVA, read the other way round): the customer reverse-charges it in Germany, France, or wherever they are. The invoice carries exemption code 115 with the mention IVA - autoliquidação. Before the first one, file a declaração de alterações ticking the box for intra-EU services ("Prestação/Aquisição de Serviços Intracomunitários"); Art. 53 status does not waive it.

But 0% VAT is not the same as no VAT obligations. If you are in the normal VAT regime you file the Declaracao Recapitulativa, an EU reporting document tracking intra-community B2B service transactions, with the same frequency as your VAT return (monthly or quarterly), from your first EU invoice. Under the Art. 53 exemption you no longer do: DL 35/2025 revoked the provision that extended that obligation to exempt taxpayers, so operations carried out from 1 July 2025 onward are left out of the recapitulativa. Operations carried out before that date still had to be reported.

Under Art. 53, the recurring cross-border filing that remains is the one for services you buy from abroad, below. See the Art. 53 exemption glossary entry for the full scope.

Foreign SaaS subscriptions: reverse-charge from day one

Cloud hosting, code hosting, office suites. When a business service like these comes from a supplier with no seat or establishment in Portugal, you're the sujeito passivo for that acquisition under Art. 2.º n.º 1 e) CIVA. You self-assess and file reverse-charge VAT on it through your Declaracao Periodica. Which entity of a provider invoices you, and from where, decides whether a given invoice is reverse-charged, so check the invoice itself.

This obligation exists from the first foreign supplier invoice. Art. 53 status does not exempt you from it.

Practical consequence: if you have only Portuguese clients and no foreign subscriptions, you likely have no Declaracao Periodica to file under Art. 53. The moment a reverse-charged foreign service lands on your books, you have one for that period.

This is the part the standard Portuguese freelancer guides skip, because most of their readers don't encounter it.


The compliance picture for a CIRS 1332 developer with foreign clients: certified invoicing or the AT's own free service, 0% VAT on EU B2B invoices (with the Declaracao Recapitulativa if you are in the normal VAT regime), Declaracao Periodica for reverse-charge VAT on foreign SaaS costs, no withholding from foreign payments so you're setting aside your own tax provision, and quarterly Social Security declarations once your contributions start. None of it is complicated once you know it exists.

Descodify keeps the rest of that picture in one place: your VAT, IRS and Social Security deadlines, and the numbers each one needs.

See how it works at descodify.pt.

Related: Why Portuguese tax automation doesn't work for expat freelancers

Related: CIRS: what the Codigo do IRS governs and how Art. 151 classifies your activity

Related: CAE: the economic activity classification for businesses and companies

Descodify handles invoicing, VAT, and IRS reporting so you can focus on your work.

Try Descodify free

Working for yourself in Portugal - monthly

Invoicing, VAT, Social Security, expenses, and tax, explained simply. One email a month.