policyengine
policyengine is the Python wrapper for PolicyEngine’s tax-benefit microsimulation models. One package for both single-household calculations and population-scale microsimulation, US and UK.
Install
pip install policyengine[us] # US rules
pip install policyengine[uk] # UK rules
pip install policyengine[us,uk] # bothMinimal example
import policyengine as pe
result = pe.us.calculate_household(
people=[{"age": 35, "employment_income": 60_000}],
tax_unit={"filing_status": "SINGLE"},
household={"state_code": "CA"},
year=2026,
)
result.tax_unit.income_tax
result.household.household_net_incomeWhere to go next
| If you want to | Go to |
|---|---|
| Install and run your first calculation | Getting started |
| Compute taxes and benefits for one family | Households |
| Express a policy change | Reforms |
| Produce population estimates (budget cost, poverty) | Microsimulation |
| See the full catalog of typed outputs | Outputs |
| Run the canonical baseline-vs-reform bundle | Impact analysis |
| Understand model structure and assumptions | Methodology |
| Understand US health coverage and costs | US health coverage and costs |
| Read program-level methodology | Programs |
| Break results down by state, constituency, district | Regions |
| Understand US vs UK differences | Countries |
| Build publication-ready charts | Visualisation |
| Pin a reproducible model-plus-data version | Release bundles |
| See a full worked script | Examples |
| Develop against the source | Development |