Spanish tax agency's algorithm scrutinizes data, not just fraud

Forget the image of meticulous tax inspectors poring over every return. Spain’s Agencia Tributaria (Tax Agency) is deploying a powerful algorithmic system that prioritizes identifying data inconsistencies over outright fraud, potentially flagging a significant portion of tax returns for review. The shift, set to impact the 2025 tax year (declared in the 2026 campaign starting this April), represents a fundamental change in how the agency approaches compliance.

The rise of the anomaly detector

Emilio Baena, a former Tax Agency inspector with a decade of experience, has shed light on the system’s inner workings via LinkedIn. His revelation dismantles the common perception of manual review, explaining that Hacienda, as the agency is known, is now focused on finding discrepancies rather than actively hunting for fraudulent activity. The system functions as an anomaly detector, cross-referencing declared income and expenses with a vast array of third-party data – bank transactions, payroll records, historical filings, and even industry averages.

But what exactly triggers this algorithmic scrutiny? According to Baena, inconsistencies are the key. A mismatch between an employer’s reported withholdings and your declared income, or unreported interest earned on a bank account, are immediate red flags. The system also digs into banking data, scrutinizing unusual income streams, frequent transfers, or balances that don’t align with your stated profession. A sudden, unexplained jump in income, violating past declarations, is another trigger, creating what Baena terms a “risk profile” – not a declaration of guilt, but an invitation for a more detailed review.

Even declaring below the average income for your profession or region can raise eyebrows, though perfectly legal. The sheer scale of data processing is staggering; in 2025 alone, Hacienda crossed 1.2 billion records, magnifying the impact of these automated checks.

Implications for autónomos, rentistas, and benefit recipients

Implications for autónomos, rentistas, and benefit recipients

The new system disproportionately affects certain groups. Self-employed individuals (autónomos) with fluctuating income, landlords who haven't declared rental income, and recipients of the Ingreso Mínimo Vital (Minimum Basic Income) – even those below the €12,600 exemption threshold – must ensure their records are impeccably aligned. A simple banking discrepancy can lead to formal requests or, ultimately, penalties for failing to rectify the situation.

“It’s not about fraud; it’s about risk,” Baena cautions. “Review before you submit.” The Tax Agency estimates that while 85% of returns are approved without changes, inconsistencies account for 70% of limited verification cases. This underscores the importance of proactive data reconciliation.

The good news? Understanding how Hacienda’s algorithm operates can be a significant advantage. Instead of fearing the system, taxpayers should familiarize themselves with its logic, addressing potential discrepancies before submitting their returns. The campaign for the Renta 2026, launching this April, presents a prime opportunity to do just that. Ignoring these evolving dynamics, however, will prove costly.