---
title: 'TaxSolver: Optimal Tax Reform Engine'
url: https://www.emergentmind.com/topics/taxsolver
type: topic
---

# TaxSolver: Optimal Tax Reform Engine

TaxSolver is an open-source optimization engine for tax reform built on the framework developed in “Implementing Optimal Taxation: A Constrained Optimization Framework for Tax Reform” [2508.03708]. It represents an entire statutory income tax system—brackets, benefits, deductions, credits—as a finite-dimensional, piecewise-linear mapping from tax-relevant inputs to tax liabilities and marginal tax rates; treats tax reform as a constrained optimization problem over that representation; and solves for the best feasible reform—or proves that none exists—given microdata for taxpayers and the chosen objective and constraints. Unlike standard microsimulation tools such as EUROMOD and TAXSIM, which are designed for ex-post “what-if” analysis of hand-coded reforms, TaxSolver is designed for ex-ante generation of optimal reforms under explicit constraints that reflect both optimal tax theory and real-world political and administrative limits [2508.03708].

## 1. Formal representation of the tax code

The starting point is the concept of a tax rule. A tax rule is a mapping from a single tax-relevant input to both an absolute tax pressure and a marginal tax pressure,
\[
y_{i,r} = f_r(x_i,\phi_r(c_i)),
\]
where \(i\) indexes taxpayers, \(r\) indexes tax rules, \(x_i\) is the rule’s input, \(c_i\) are taxpayer characteristics, \(\phi_r(c_i)\) are rule parameters, and \(y_{i,r}\) is the absolute tax pressure from rule \(r\) for taxpayer \(i\). The framework assumes four properties: additivity, single input, piecewise linearity, and heterogeneity via characteristics. These conditions are stated to be satisfied by most real-world income-tax rules.

Three archetype rules organize the representation. Tax brackets generate progressive schedules through bracket-specific marginal rates. Benefits generalize brackets by allowing group-specific lump sums and phased-out patterns. Deductibles and credits are represented as input-reducing or tax-crediting deductions. For bracket rules, the schedule takes the form
\[
f(x_i) = \sum_{b=1}^B \alpha_b\, g_b(x_i),
\]
where \(B\) is the number of brackets, \(\alpha_b\) is the marginal tax rate in bracket \(b\), and \(g_b(x_i)\) extracts the portion of \(x_i\) in bracket \(b\).

A tax group is defined as a set of taxpayers who, conditional on the same vector of inputs \(\mathbf{x}\), face the same tax rules and parameters. Within tax group \(k\), the total tax code is
\[
f_k(\mathbf{x}_i) = \sum_{x \in \mathbf{x}_i} \sum_r f_r\big(x,\phi_{r,k},\alpha_{r,k}\big) + Z_{r,k},
\]
where \(\phi_{r,k}\), \(\alpha_{r,k}\), and \(Z_{r,k}\) are group-specific cutoffs, marginal rates, and lump-sum components. Because each component rule is piecewise linear and rules are additive, the total tax function is again piecewise linear. The “brackets” of the total tax function are the union of all rule-specific cutoffs.

This representation is fully characterized by two parameter sets: the support \(\Phi\), consisting of all cutoffs that define brackets for all inputs, and the rates \(\mathcal{A}\), consisting of marginal rates on each interval together with group-specific lump sums. A reform is therefore either a change in rates with fixed support, \(\mathcal{A}\to\mathcal{A}^\star\), or a joint change in support and rates, \((\Phi,\mathcal{A})\to(\Phi',\mathcal{A}')\). TaxSolver treats the relevant entries in \(\mathcal{A}\), and optionally in \(\Phi\), as solver variables.

## 2. Reform as a constrained optimization problem

TaxSolver’s core modeling primitives are solver variables, constraints, and an objective function. Given microdata with inputs \(x_i\) and observed tax liabilities \(y'_i\) under the status quo, the current system can be recovered as a feasibility problem:
\[
\min_{\mathcal{A}} 0 \quad \text{s.t.} \quad f(x_i,\mathcal{A})\big|_\Phi = y'_i,\quad \forall i=1,\dots,n.
\]
This is a system of linear equations in \(\mathcal{A}\); if the design matrix has full rank, the unique solution is the status-quo schedule. The same formalization then permits systematic modification of the code.

Distributional protection is implemented through income constraints. A simple proportional upper bound on tax payments is
\[
f(x_i,\mathcal{A}) \le (1+\epsilon)\,y'_i,\quad i=1,\dots,n.
\]
Variants include household-level constraints and asymmetric protections. One example requires households with income below €70,000 to gain at least 5% net income, while others cannot lose more than 10%. Marginal tax constraints are imposed directly on bracket rates, for example
\[
\alpha_b \le \tau_{\max},\quad \forall b,
\]
with analogous lower bounds. Budget constraints can be written as bounds on aggregate revenue change,
\[
\sum_i \big[y'_i - f(x_i,\mathcal{A})\big] \le C,
\]
or as near-revenue-neutral bands such as
\[
0.985\sum_i y'_i \le \sum_i f(x_i,\mathcal{A}) \le 1.015\sum_i y'_i.
\]

Objectives are likewise flexible. TaxSolver can minimize revenue loss subject to distributional and marginal-rate constraints, simplify the tax system by minimizing the number of active rules or brackets through a complexity heuristic, or implement multi-objective reform. In the Dutch example, the authors use a two-stage optimization: first, minimize revenue loss subject to constraints; second, with an extra 1% of baseline revenue slack, re-optimize by minimizing complexity. The paper does not implement an explicit social welfare function such as \(W=\sum_i g_iU_i\), but it states that such an objective could be embedded in the same framework.

## 3. Behavioral responses and welfare interpretation

The framework can incorporate behavioral responses by allowing taxable income to depend on tax rates. In Example 3, the authors use a common elasticity of taxable income \(\delta\) with respect to changes in the marginal tax rate in the top active bracket. In general form, taxable income is updated as
\[
x^{\text{new}}_{i,\text{income}}
=
x_{i,\text{income}}\cdot\bigl(1+\delta\cdot(\tau^{\text{sq}}_i-\tau^{\text{new}}_i)\bigr),
\]
where \(\tau^{\text{sq}}_i\) and \(\tau^{\text{new}}_i\) are the old and new marginal rates in the taxpayer’s top bracket. The updated inputs then enter the constraints and revenue calculations.

Because this introduces products of solver variables, the optimization becomes nonlinear, specifically quadratic in the example given. The computational treatment is a step-wise iterative approach: solve the problem without behavioral responses; compute behavioral responses given the solved schedule; update income constraints and revenue; re-solve; and repeat until convergence. The paper notes that Gurobi supports such iterative schemes, and that purely linear implementations can approximate behavioral responses by taxing the difference in taxable income at the old marginal rate.

Welfare evaluation remains implicit rather than structural. The framework’s welfare content is encoded in shape constraints on marginal rates, caps on income losses, revenue constraints, and possible complexity penalties. This suggests that TaxSolver is principally an implementation device for constrained reform design rather than a welfare-weight estimation framework. A plausible implication is that the package is especially suited to settings in which policymakers already know the admissible reform set and want optimized, legislatable parameters inside that set.

## 4. Computational implementation

TaxSolver is implemented as a mathematical programming system. Most problems are linear programs when both the objective and the constraints are linear in \(\mathcal{A}\); mixed-integer linear programs when complexity penalties or rule activation require on/off decisions; and quadratic or mixed-integer quadratic programs when behavioral responses create products of solver variables. The implementation described in the paper uses Gurobi, while the open-source toolkit is designed to support other solvers as well [2508.03708].

Tractability follows from the finite-dimensional representation of the tax system: a finite number of inputs, brackets, rules, and tax groups. When objectives and constraints are linear, LPs deliver a guaranteed global optimum and MILPs provide bounds together with infeasibility certificates. The framework emphasizes two practical outputs of optimization software: optimality certificates and feasibility diagnostics. If no tax schedule satisfies all specified requirements, the solver can certify infeasibility, indicating that the political and technical demands are mutually inconsistent.

The package is described as transparent, tractable for realistic codes, and capable of producing legislatable parameters. The paper does not provide runtime benchmarks, but it states that the Dutch example demonstrates feasibility at national-scale complexity using synthetic microdata for 13,500 taxpayers, weighted to 13.5 million. The modular structure separates simulation, optimization, and evaluation as distinct conceptual steps.

## 5. Dutch reconstruction and reform family

The paper illustrates the framework through a detailed reconstruction of the Dutch income tax system, circa proposed 2028 reforms. The modeled rules include income tax brackets; healthcare allowance (\(zorgtoeslag\)); rental allowance (\(huurtoeslag\)); multiple child-related benefits (\(kinderbijslag\), \(kinderopvang\)-toeslag, \(kindgebonden\) budget); labor tax credits; self-employment deductions; employee pension deductions; elderly credits and single-elderly credits; home-owner imputed income (\(eigenwoningforfait\)); and the young handicapped credit. The simulated dataset contains 13,500 taxpayers and 8,500 households, with weights scaling to 13.5 million taxpayers and 8.5 million households. It matches Dutch population aggregates on simple statistics but is not fully representative, especially at the very top of the income distribution [2508.03708].

The baseline system exhibits large spikes in marginal tax pressure, often exceeding 80% for low- and middle-income households because of overlapping benefit tapering. The reform problem encodes three goals: reduce spikes in marginal tax pressure, simplify the tax system, and protect low- and middle-income households from large income losses. These are translated into a household-level income constraint under which no household can lose more than 5% of net income, a marginal-rate cap \(\gamma\) taking values such as \(0.55\), \(0.6\), \(0.65\), \(0.7\), \(0.75\), and \(0.8\), and a revenue constraint keeping total revenue within \(\pm 1.5\%\) of baseline.

For the reform support, the authors do not retain the status-quo brackets. Instead, they use a common support for income before tax,
\[
\Phi_{\text{income}}
=
[0, 10{,}000, 20{,}000, 25{,}000, 30{,}000, 35{,}000, 50{,}000, 70{,}000, 90{,}000, 110{,}000, 150{,}000, 200{,}000, 250{,}000, \infty],
\]
plus group-specific supports
\[
\Phi_{k,\text{income}}
=
[0, 20{,}000, 30{,}000, 50{,}000, 90{,}000, 150{,}000, 250{,}000]
\]
for groups such as the self-employed, the lowest earner in a couple, young handicapped individuals, retirees, and standard employees. The solver can also reuse existing complex rules by including each rule’s current absolute and marginal tax pressures as additional inputs with a continuous scaling factor between 0.8 and 1.1 and a binary activation variable.

Simplification is operationalized through a weighted rule-count heuristic. A universal rule receives weight 1 per rate; a group-specific rule has doubled weight if it applies only to a specific group or requires multiple conditions; and complex multi-condition rules such as child benefits, healthcare allowance, and rental allowance receive weight 10.

| Scenario | Total rule weight | Rules |
|---|---:|---|
| Baseline system | 101 | 17 rules (13 income-dependent) |
| Reform with cap at 75% | 32 | 8 rules (4 income-dependent) |
| Reform with cap at 65% | 39 | 9 rules (6 income-dependent) |

The reported reform family smooths marginal-rate spikes to the chosen cap, reduces the number of rules, and preserves the 5% household income-loss guarantee while remaining near revenue-neutral. With \(\gamma=65\%\), marginal rates are smoother and stay below 65%; with \(\gamma=75\%\), the system retains more flexibility but still shows a drastic reduction in extreme spikes relative to the status quo. Figure 7 is described as showing revenue cost versus complexity for different caps, with the result that many combinations of lower caps and simplification are feasible within the \(\pm 1.5\%\) revenue band, while beyond \(\gamma=0.65\), tighter caps require more complexity to satisfy the income constraints.

## 6. Workflow, limitations, and significance

The package workflow begins by specifying tax rules and tax groups, including inputs such as income before tax, household income, number of children by age, and home value. Users then provide microdata \(\mathcal{D}\) containing inputs \(\mathbf{x}_i\), characteristics \(c_i\), observed taxes \(y'_i\), and optionally marginal tax pressures. Next, they choose solver variables, deciding which rates \(\alpha_{r,k}\), lump sums \(Z_{r,k}\), and optionally cutoffs \(\phi\) may change. They declare constraints, including income-loss protections, rate caps, revenue bounds, simplicity constraints, and protected rules fixed at baseline values; define single or multi-objective targets; run the optimization; and translate the resulting parameters into statutory rules. The package returns optimal parameters \(\mathcal{A}^\star\) together with derived outcomes such as taxes, marginal rates, and rule usage.

The framework has several explicit limitations. It requires representative microdata covering all tax-relevant inputs, characteristics, and current absolute and marginal tax pressures. In the Dutch case, the data are synthetic and illustrative rather than precise, with incomplete representation of the top income tail and imperfect correlations across characteristics. Behavioral responses are modeled in reduced-form fashion through a common elasticity \(\delta\) applied to the top active bracket only. The framework is partial-equilibrium: it does not simulate general equilibrium effects such as wages, prices, or employment, and political constraints are encoded as hard constraints rather than derived from a political economy model. Adding integer variables or nonlinearities increases computational complexity, and difficult non-convex problems may require approximate solutions or step-wise reform design.

The paper identifies several extensions: dynamic bracketing, in which bracket placement itself becomes endogenous; richer multi-objective optimization using Pareto-frontier methods or explicit weighted sums; better complexity measures based on administrative burden; integration with structural optimal tax models; and broader country coverage, including low- and middle-income countries. In significance terms, TaxSolver is presented as bridging the implementation gap between optimal taxation theory and actual tax codes. Optimal tax theory offers analytic prescriptions for marginal tax schedules, while statutory codes combine brackets, benefits, credits, and deductions under political and administrative constraints. TaxSolver makes those constraints explicit, jointly redesigns the full code within a specified piecewise-linear class, and either produces a feasible, legislatable reform or proves that the requested package is infeasible [2508.03708].

Source: https://www.emergentmind.com/topics/taxsolver