# Tessera: Settle up with the fewest moves

> Net everyone to a single balance in integer cents, then greedily match creditors to debtors - at most n−1 transfers. 10 tested invariants keep the books exact.

Tessera settles shared expenses among a group with the fewest possible transfers. It nets everyone down to a single balance in integer cents, then greedily matches creditors to debtors, guaranteeing at most n-1 transfers. It is a from-scratch, dependency-light build whose books are kept exact by 10 tested invariants, and you can download and run it locally.

## About the app

A real algorithm over multi-person state

## What to take away

- Net everyone to a single balance in integer cents, then greedily match creditors to debtors - at most n−1 transfers. 10 tested invariants keep the books exact.
- Download: Tessera (ZIP)

## Tags

Free software, Tessera

## Read the full write-up

/downloads/tessera.zip

## We build this for clients

https://dfieldsolutions.com/en/services/full-stack

## More from the lab

- https://dfieldsolutions.com/en/lab/sylex.md — Sylex: Make sense of the slashes
- https://dfieldsolutions.com/en/lab/kindra.md — Kindra: Miss a beat, not the rhythm
- https://dfieldsolutions.com/en/lab/voxara.md — Voxara: Argue better. Lose gracefully
- https://dfieldsolutions.com/en/lab/wraithward.md — Wraithward: Spot the bait before you bite

---

Source: https://dfieldsolutions.com/en/lab/tessera
DField Solutions — Torony köz 5-1.a, 2120 Dunakeszi, Hungary — +36 20 722 0002 — dezso@dfieldsolutions.com
Booking: see https://dfieldsolutions.com/en/contact
