Clarify your doubts by consulting your particular case
The general limitation period under Spanish tax law is four years, subject to interruption and special rules. The General Tax Law distinguishes four rights, each with its own starting point (Articles 66 to 68):
a) The Tax Administration’s right to determine a tax debt by assessment (Article 66(a)): as a general rule, the period begins on the day after the statutory deadline for filing the return or self-assessment. For taxes collected periodically by receipt where no return or self-assessment is required, it begins on the date the tax accrues (Article 67(1)).
b) The right to demand payment of assessed or self-assessed debts (Article 66(b)): the period begins on the day after the voluntary payment period ends. Specific rules apply to joint and subsidiary liable persons under Article 67(2).
c) The right to request refunds under the rules governing a tax, refunds of undue payments, and reimbursement of guarantee costs (Article 66(c)): the starting point depends on the circumstances. In general, it is the day after the statutory period for requesting the refund expires, or the day after the refund could have been requested. For an undue payment, it is the day after payment; if payment was made within the deadline for filing a self-assessment, it is the day after that deadline. Where a final administrative decision or court judgment declares the challenged act wholly or partly unlawful, the period starts on the day after that decision or judgment becomes final (Article 67(1)).
d) The right to receive the refund or reimbursement (Article 66(d)): the period begins on the day after the statutory deadline for making the refund expires, or on the day after notification of the decision recognizing the right (Article 67(1)).
The power to impose tax penalties has its own four-year limitation period, running from the date the infringement was committed (Article 189(2)); it is not the right to request refunds under Article 66(c). Once a penalty has been imposed, the period for demanding payment follows the rules for collection of tax debts (Article 190(2)).
Special rule for Transfer Tax and Stamp Duty (ITP-AJD): for limitation purposes, the date of a private document that must be submitted for assessment is presumed to be the date it is submitted, unless one of the events listed in Article 1227 of the Civil Code occurred earlier: incorporation or registration in a public register, the death of a signatory, or delivery to a public official in the performance of their duties. This rule determines which date is attributed to the document and operates together with the statutory limitation period and calculation rules; it does not create a general five-year period (Article 50(2) of the consolidated ITP-AJD Act).
The calculation in a particular case may be affected by the interruption grounds in Article 68 of the General Tax Law and by other special rules. A case-specific assessment should identify the right involved, its starting date, any interrupting acts and, where relevant, any statutory suspension.
Official sources:
General Tax Law, consolidated text: https://www.boe.es/eli/es/l/2003/12/17/58/con
Consolidated ITP-AJD Act: https://www.boe.es/eli/es/rdlg/1993/09/24/1/con
Civil Code, Article 1227: https://www.boe.es/buscar/act.php?id=BOE-A-1889-4763



I had a really urgent problem in the middle of the summer that I needed to get fixed. I tried contacting a bunch of agencies but they were either unavailable, slow, had terrible service or were crazy expensive (one company quoted me 1000€!). Josep replied to me within 10 minutes and managed to submit my forms on the deadline and all for a great price. He saved my life - 100% recommend!