---
title: "64-Bit Bank Balances ‘Ought to be Enough for Anybody’?"
description: "TigerBeetle moved all amounts and balances from 64-bit to 128-bit unsigned integers because sub-cent precision (micro-cents, fuel prices, stock ticks, micropayments, digital currencies), long-lived accumulating balances and even hyperinflation can exceed 64-bit range."
url: "https://swe.quest/articles/64-bit-bank-balances-ought-to-be-enough-for-anybody-8d02b22f3ee30543"
canonical: "https://tigerbeetle.com/blog/2023-09-19-64-bit-bank-balances-ought-to-be-enough-for-anybody"
source: "TigerBeetle"
published: "2023-09-19"
difficulty: "medium"
kind: "Deep dive"
reading_minutes: 8
tags: ["payments","databases","performance","api-design"]
---

# 64-Bit Bank Balances ‘Ought to be Enough for Anybody’?

A post on [TigerBeetle](https://swe.quest/sources/tigerbeetle.md), published 2023-09-19, 8 min read, Deep dive. Original: [https://tigerbeetle.com/blog/2023-09-19-64-bit-bank-balances-ought-to-be-enough-for-anybody](https://tigerbeetle.com/blog/2023-09-19-64-bit-bank-balances-ought-to-be-enough-for-anybody)

## Summary

TigerBeetle moved all amounts and balances from 64-bit to 128-bit unsigned integers because sub-cent precision (micro-cents, fuel prices, stock ticks, micropayments, digital currencies), long-lived accumulating balances and even hyperinflation can exceed 64-bit range. Ledgers use integer multiples of a user-defined minimal unit, never floats, and keep separate strictly positive debit and credit totals instead of signed balances. Generated x86-64 code shows 128-bit add, subtract, multiply and compare compile to a few carry/borrow instructions, so the overhead is immaterial. Only division needs a software routine. Since most client languages lack native 128-bit types, clients expose values as pairs of stack-allocated 64-bit integers, with helpers to convert to BigInteger, byte arrays or UUIDs.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Payments & fintech](https://swe.quest/tags/payments.md) (Domains)
- [Databases](https://swe.quest/tags/databases.md) (Data & databases)
- [Performance engineering](https://swe.quest/tags/performance.md) (Reliability & operations)
- [API design](https://swe.quest/tags/api-design.md) (Backend & APIs)

## Prerequisites

- binary integer representation
- floating point basics
- double-entry accounting

## Keywords

TigerBeetle, 128-bit integers, x86-64, BigInteger, .NET Int128, double-entry accounting

## Related posts

- [A Database Without Dynamic Memory Allocation](https://swe.quest/articles/a-database-without-dynamic-memory-allocation-4be7684fa723cb5d.md): TigerBeetle · 2022-10-12 · Medium · 6 min read · Memory management, Zig, Databases, Storage engines, Testing
  TigerBeetle allocates all memory once at startup and never again, using fixed limits for connections, in-flight messages per client, replicas, message size and queries per message so that total memory is a simple compile-time sum.
- [How Go 1.24’s Swiss Tables saved us hundreds of gigabytes](https://swe.quest/articles/how-go-1-24-s-swiss-tables-saved-us-hundreds-of-gigabytes-4fbf9a0f30e1e4c9.md): Datadog Engineering · 2025-07-17 · Medium · 17 min read · Go, Data structures, Memory management, Runtimes & VMs, Performance engineering
  Go 1.24's new map implementation, based on Swiss Tables and extendible hashing, cut roughly 500 MiB of live heap (about 1 GiB of RSS with GOGC=100) from a 3.5-million-entry routing cache map, enough to more than offset a separate Go 1.24 mallocgc memory regression.
- [Parsing JSON from Postgres in JS? Don’t get the wrong number](https://swe.quest/articles/parsing-json-from-postgres-in-js-don-t-get-the-wrong-number-5e25d42dfaa1da08.md): Neon · 2023-08-24 · Medium · 12 min read · JavaScript, PostgreSQL, Performance engineering, Runtimes & VMs
  JavaScript's JSON.parse() silently corrupts Postgres bigint and numeric values beyond Number.MAX\_SAFE\_INTEGER, so a row id can quietly become a different id.
- [Rediscovering Transaction Processing From History and First Principles](https://swe.quest/articles/rediscovering-transaction-processing-from-history-and-first-principles-7a5a2c6c3ea0ae42.md): TigerBeetle · 2024-07-23 · Easy · 9 min read · Databases, Consistency models, Payments & fintech, Performance engineering, System design
  General-purpose OLTP databases hit a hard throughput ceiling on debit/credit workloads because row locks are held across multiple network round-trips, and hot rows such as a few internal accounts serialize nearly every transaction.
- [Introducing Fast, Native Encryption in Turso Database](https://swe.quest/articles/introducing-fast-native-encryption-in-turso-database-3bdde23a22f614e0.md): Turso · 2025-10-07 · Medium · 4 min read · SQLite, Cryptography, Storage engines, Rust, Performance engineering
  Turso Database, a Rust rewrite of SQLite, now supports native encryption at rest using AEAD ciphers (AEGIS-256 and AES-GCM).

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
