---
title: "How we built it: Jurisdiction resolution for Stripe Tax"
description: "Stripe Tax’s jurisdiction resolution system (JRS) determines which US taxing jurisdictions apply to a transaction, a difficult task because more than 16,000 combinations of rates and rules depend on intricate, changing boundaries. Its offline geographic information system cleans and standardizes boundary data, overlays states, counties, cities, and districts, and generates time-aware Stripe places of taxation (SPOTs), while the online system matches an address to the relevant SPOT. To reduce point-in-polygon latency, JRS indexes nested bounding boxes in a balanced R-tree rebuilt with the Sort-Tile-Recursive algorithm, narrowing candidates before applying the final polygon calculation; disjoint SPOTs are split and smaller boxes prioritized. Most states achieve address matching in a few milliseconds, with 95th-percentile latency below 10 milliseconds except South Carolina, while historical SPOT data creates an ongoing memory challenge."
---

# How we built it: Jurisdiction resolution for Stripe Tax

[Stripe](https://yomu.fyi/company/stripe) · Erich Rentz · Jul 10, 2025

**Type:** Explainer

## Summary

Stripe Tax’s jurisdiction resolution system (JRS) determines which US taxing jurisdictions apply to a transaction, a difficult task because more than 16,000 combinations of rates and rules depend on intricate, changing boundaries. Its offline geographic information system cleans and standardizes boundary data, overlays states, counties, cities, and districts, and generates time-aware Stripe places of taxation (SPOTs), while the online system matches an address to the relevant SPOT. To reduce point-in-polygon latency, JRS indexes nested bounding boxes in a balanced R-tree rebuilt with the Sort-Tile-Recursive algorithm, narrowing candidates before applying the final polygon calculation; disjoint SPOTs are split and smaller boxes prioritized. Most states achieve address matching in a few milliseconds, with 95th-percentile latency below 10 milliseconds except South Carolina, while historical SPOT data creates an ongoing memory challenge.

## Context

US sales tax calculation must distinguish among more than 16,000 combinations of rates and rules, but postal addresses do not reliably align with taxing jurisdictions. Public boundary data varies in accuracy and consistency, jurisdiction polygons can contain thousands of sides, and tax boundaries change over time. Direct polygon calculations could therefore produce incorrect taxes or add unacceptable latency to online transactions.

## Approach / What changed

The jurisdiction resolution system uses an offline GIS to clean, centralize, and standardize boundaries for states, counties, cities, and districts, then overlays them to create time-aware Stripe places of taxation (SPOTs). Online, it narrows address matching through nested bounding boxes in a balanced R-tree rebuilt with the Sort-Tile-Recursive algorithm before applying point-in-polygon calculations to the remaining candidates. Smaller boxes are prioritized, and disjoint SPOTs are split into component areas.

## Takeaways

- SPOTs represent regions defined by unique combinations of taxing authorities, allowing transactions in the same region to share state, county, and local tax applicability.
- The online matcher avoids pairing all 166 million US mailing addresses with SPOTs in advance; it searches on demand through bounding boxes and applies point-in-polygon checks only to a reduced candidate set.
- Address matching is below 10 milliseconds at the 95th percentile for all covered states, territories, and Washington, DC except South Carolina; retaining historical SPOTs remains a memory challenge.

**Tags:** [Architecture](https://yomu.fyi/topic/architecture), [Performance](https://yomu.fyi/topic/performance), [Reliability](https://yomu.fyi/topic/reliability)

- Source: [Stripe](https://stripe.dev/blog/how-we-built-it-jurisdiction-resolution-for-stripe-tax)
- Source URL: https://stripe.dev/blog/how-we-built-it-jurisdiction-resolution-for-stripe-tax
- Ingested by Yomu: 2026-08-28T08:59:16.799Z

[Read original post](https://stripe.dev/blog/how-we-built-it-jurisdiction-resolution-for-stripe-tax)
