Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

tax-engine

Latest version: v0.6.1

Overview

Last scanned
29 Nov 2026
Published
29 Nov 2026
PyPI package Publisher: The-Pied-Piper
3 Stars
0 Forks
12 Versions
1.7K Downloads
Python Repo language

Scan summary

tax-engine was last scanned on 29 Nov 2026 at version 0.6.1. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 12 versions; the latest 5 were published within 6 days (24–29 Nov 2026).
  • Findings: No rules fired in version 0.6.1.
  • Downloads: 1,688 downloads.

Versions

12 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.6.1 LATEST 29 Nov 2026 No rules fired
0.6.0 27 Nov 2026 No rules fired
0.5.3 26 Nov 2026 No rules fired
0.5.2 25 Nov 2026 Not shown
0.5.1 24 Nov 2026 Not shown

No rules fired in 0.6.1

Findings

Findings for v0.6.1. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 0.6.1; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

tax-engine: an open-source income tax calculation engine in Python

CI PyPI License: Apache-2.0 Python 3.12+

tax-engine is a personal income tax calculation library where every number is a line on a real tax form, and every result explains itself in a readable trace.

Tax rules live as data taken as printed from the tax authority's own forms. Each form line is one small, tested step. You can follow any figure back to the form line it came from. It powers the live take-home calculator at aftertaxlens.com.

Supported today: Canada (federal), Ontario, Alberta, British Columbia, Manitoba, New Brunswick, Saskatchewan, Newfoundland and Labrador, Nova Scotia, Prince Edward Island and Quebec, tax years 2025 and 2026 (2026 is provisional). More forms, lines, years and jurisdictions are added over time (see Coverage).

Example: a $70,000 salary (tax year 2025)

Given only a gross salary, the engine works out the contributions and tax from the CRA forms. Take-home is then salary minus CPP, EI and total tax, a subtraction done by the caller outside the engine:

Item Amount
Federal tax 7,585.64
Ontario tax (ON428, incl. health premium) 3,911.45
Total tax 11,497.09
CPP contributions (base 3,291.75 + enhanced 665.00) 3,956.75
EI premiums 1,077.48
Take-home 53,468.68

Every figure the engine computes comes with a trace saying how it was reached. Each trace line is about one figure (line.label), and its sentence names the figures it uses as the form prints them, so a caller shows the figure beside the sentence. This is the trace for the last Ontario line (ON428 line 90, "Ontario tax"):

line 90: Line 88 (CA$3311.45) plus line 89 (CA$600.00) gives CA$3911.45 (rounded to the nearest cent).

Why tax-engine

  • Explains itself. A trace for every line: inputs, operation, result, rounding. A renderer turns it into text in any language; English is built today.
  • Mirrors the forms. One form line is one capability, so engine steps read like the form itself.
  • Rules are data. Rates, thresholds and limits are datasets copied as printed, never recomputed in code.
  • Follows the published forms. The engine follows the CRA's published forms and formulas, including the T4127 payroll guide, line by line. It is an independent estimation tool and has not been reviewed or approved by the CRA.
  • Exact arithmetic. Decimal everywhere, never float. Rounding happens only where a dataset says to round, as the form does.
  • Checked over a range of salaries. We check the engine's results over more than a hundred salaries per province and year, covering every bracket edge and the CPP and EI ceilings.
  • Jurisdiction-agnostic core. Jurisdictions are plugins that add forms, datasets and capabilities; adding one does not change the core.

Quick start

Requires Python 3.12 or newer. Install from PyPI:

pip install tax-engine

To work on the engine itself, install from a checkout instead:

git clone https://github.com/The-Pied-Piper/tax-engine.git
cd tax-engine
pip install -e .

Run the example, which prints the English trace for every form (the argument is the gross salary):

python examples/quickstart.py 70000

examples/quickstart.py:

import sys
from decimal import Decimal

from tax_engine import build_tax_computation
from tax_engine.adapters.inbound.trace_english import EnglishNames, EnglishTraceRenderer
from tax_engine.application.models.calculation_request import TaxCalculationRequest
from tax_engine.domain.artifact import Artifact
from tax_engine.domain.jurisdiction_code import JurisdictionCode
from tax_engine.jurisdictions.ca.catalog.income import EMPLOYMENT_INCOME

engine = build_tax_computation()
sheets = engine.compute(
    TaxCalculationRequest(
        JurisdictionCode("CA-ON"), 2025, (Artifact(EMPLOYMENT_INCOME, Decimal(sys.argv[1])),)
    )
)
for form, form_sheets in sheets.items():
    for sheet in form_sheets:
        print(f"\n== {form} ==")
        renderer = EnglishTraceRenderer()
        names = EnglishNames(sheet)
        for line in sheet.trace:
            # The sentence names the figures it uses as the form prints them when it is given
            # the worksheet; the figure the line is about is named beside it.
            sentence = renderer.render(line, sheet)
            print(sentence if line.label is None else f"{names.of_label(line.label)}: {sentence}")

The example uses Ontario (CA-ON) and tax year 2025. Change CA-ON to CA-AB for Alberta, CA-BC for British Columbia, CA-MB for Manitoba, CA-NB for New Brunswick, CA-SK for Saskatchewan, CA-NL for Newfoundland and Labrador, CA-NS for Nova Scotia, CA-PE for Prince Edward Island or CA-QC for Quebec, and 2025 to 2026 for the provisional 2026 year.

Take-home pay

To get what a salary leaves after income tax, CPP and EI, ask the take-home service. It returns each figure exactly, the total and the take-home as plain sums, both average and marginal income tax rates and the unit text of the figures, and, only when asked for, the English trace of every form:

from decimal import Decimal

from tax_engine import build_take_home
from tax_engine.domain.jurisdiction_code import JurisdictionCode
from tax_engine.application.models.take_home_request import TakeHomeRequest

answer = build_take_home().compute(
    TakeHomeRequest(JurisdictionCode("CA-ON"), 2025, Decimal(70000), include_trace=False)
)
print(answer.take_home)  # 53468.68

A jurisdiction takes part when its manifest declares take_home figures (see docs/manifest-format.md).

How it works

A jurisdiction's manifest lists the forms that make up a return. Each form is built line by line from small capabilities (sum, bracket tax, credit, cap, and so on) fed by parameter datasets for the tax year. The engine wires the forms together, runs them, and records a trace for every step.

Coverage

Jurisdiction Year Forms and lines built
Canada (federal) 2025, 2026 (provisional) T1 General tax lines, Schedule 8 (CPP), T2204 (EI), Schedule 6 (Canada workers benefit), taxable income
Ontario 2025, 2026 (provisional) ON428 (Ontario tax), ON428-A (LIFT credit)
Alberta 2025, 2026 (provisional) AB428 (Alberta tax), Worksheet AB428 (Alberta supplemental tax credit)
British Columbia 2025, 2026 (provisional) BC428 (British Columbia tax), BC479 (BC refundable tax credits)
Manitoba 2025, 2026 (provisional) MB428 (Manitoba tax), Worksheet MB428 (basic personal amount), MB428-A (family tax benefit), MB479 (Manitoba credits)
New Brunswick 2025, 2026 (provisional) NB428 (New Brunswick tax)
Saskatchewan 2025, 2026 (provisional) SK428 (Saskatchewan tax)
Newfoundland and Labrador 2025, 2026 (provisional) NL428 (Newfoundland and Labrador tax), Worksheet NL428 (age amount and disability amount for self)
Nova Scotia 2025, 2026 (provisional) NS428 (Nova Scotia tax)
Prince Edward Island 2025, 2026 (provisional) PE428 (Prince Edward Island tax)
Quebec 2025, 2026 (provisional) CRA 5005-R (T1 for Quebec residents) with Schedules 6, 8 and T2204, and Revenu Quebec TP-1 with Work Charts 201 and 401 and Schedules B, F, K, P and U, plus the solidarity tax credit

Roadmap: more forms and lines, and the other provinces and territories. Forms are added one at a time, each built line by line from the CRA's own text.

Disclaimer and limits

tax-engine is not tax advice and is not an official CRA or Revenu Quebec product. It comes with no warranty, as the Apache-2.0 license says.

It covers tax years 2025 and 2026 (2026 is provisional), Canada (federal), Ontario, Alberta, British Columbia, Manitoba, New Brunswick, Saskatchewan, Newfoundland and Labrador, Nova Scotia, Prince Edward Island and Quebec only, and only the forms and lines listed under Coverage. A return with items the engine does not model will not come out right. The take-home example assumes a single filer with salary as the only income.

Check any result against the CRA's own forms (and Revenu Quebec's for Quebec) or with a professional before relying on it.

Contributing

Issues and pull requests are welcome. Developer setup and checks are in CONTRIBUTING.md.

License

Licensed under the Apache License, Version 2.0.

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • pypi-releases tax-engine

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Plug and Pray: Your AI Agents Are Taking Orders From Strangers
Research

Plug and Pray: Your AI Agents Are Taking Orders From Strangers

Critical Apache HTTP Server Flaw Exposes Web Servers to RCE (1)
CVE

CVE-2026-119618: Critical Apache HTTP Server Flaw Exposes Web Servers to Remote Code Execution

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Vulnerability Insights

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?

Frame 2085668439 (1)
Group 1261154229