

# Calculators [#calculators]

A calculator is the public unit you ask TaxKit to run. It accepts canonical
facts, composes the matching rules and returns a schema-backed report.

## When this matters [#when-this-matters]

Choose the calculator before you build a form, an API payload or a test. The
selected calculator decides which facts are accepted and which report shape is
returned.

## How it works [#how-it-works]

```ts
CalculatorRunRequest
  -> selected calculator catalog entry
    -> canonical input fact schema decode
    -> rule pack and parameter layers
    -> report schema
```

For most TypeScript callers, use `au.incomeTax.annual` or
`TaxKit.calculate`. For HTTP callers, pass the calculator ID in the route and
the facts in the `CalculatorRunRequest` body.

## Related concepts [#related-concepts]

* [Facts](/concepts/facts)
* [Rules](/concepts/rules)
* [Reports](/concepts/reports)
* [Calculators architecture](https://github.com/crcorbett/taxkit/blob/a151e51e8a30247526fa93412df046955846eca4/docs/architecture/calculators.md)
