Soroban・算盤
An exact calculator with a spreadsheet attached.
Type expressions into a scrolling log, or flip to a 26×1,000
grid where cells hold formulas, controls, and definitions.
Underneath: an arbitrary-precision decimal engine — 0.1 + 0.2 is exactly
0.3, and money math never picks up floating-point
drift.
Free & open source · macOS 14+ · saves plain, diffable files
Every behavior is a written, continuously-verified specification.
Built around one idea: be exact, then stay out of the way
Exact by construction
everywhere
Arbitrary-precision decimals: + − × and integer
powers are exact, division carries 50 significant digits. Machin's
1706 formula recovers π to 51 places — in three typed lines.
Log and grid, one engine
log · grid
The calculator log and the spreadsheet share variables and
functions. Reference B:1 from the log, use
rate in a cell, sum a column with
sum(A:1..A:9) — across worksheets too.
Custom functions
everywhere
Need a custom function? Add it. f(x) = x * 2 registers
f(x) as a valid function. Custom functions support
recursion, LaTeX-style ∑/∏, and user-defined
documentation.
Programmer friendly
log · cliAnzan — Soroban's expression language — comes with data structure support including arrays, maps, strings, and booleans. We also support higher-order functions, lambdas, and a full language spec.
Live what-if controls
grid rate = slider(0.08, 0, 0.2) renders as a draggable
slider in its cell — plus steppers, checkboxes, dropdowns. The
whole model recalculates as you drag; one undo step on release.
Named Cells
grid
Name a cell and write 'Projected Rate' * 12 instead
of B:7. Sheet-scoped definitions render as
λ and 𝑖 cells. Renames update every
referencing formula.
Read your own workbook
grid
A formula can inspect the workbook itself —
Workbook.worksheets["Budget"].cell("B", 1).value
or the shorthand cell("A", 1).value,
sheetNames(). Reads are live; log commands like
updateCell and addWorksheet change
it, one undo step each.
Data sheets that scale
grid
Import 100,000-row CSVs into SQLite-backed sheets inside the
document — formulas reach every row (sum(Sales!C:2..C:100000)), opens stay instant.
Common formulas built in
everywhere
Support for common formulas across domains: statistics (median, stdev), algebra (sqrt, gcd), logic (if,
and, or), finance (pmt,
irr, xirr), and dates (edate, days).
A simple file format
log · grid .soroban is a documented package of pretty-printed
JSON (+ SQLite for data) — diffable, scriptable, hand-editable.
CSV in and out.
Lives in your terminal
cli
The full language ships as a soroban CLI: an
Anzan REPL with tab completion, signature hints, and
persistent history — or pipe it
(echo "fact(25)" | soroban) and script against
real exit codes.
Documentation built in
everywhere man(pmt) explains any built-in; ⌘/ opens a
searchable reference. Your own functions get man pages from a
trailing # comment — and every documented example
is evaluated by the test suite, so the docs can't rot.
Make it yours
Ten built-in themes — Solarized, Dracula, Nord, gruvbox… — or drop a small JSON theme in Application Support to make your own. This site is wearing two of them.
Open source
Soroban is developed in the open — the calculation engine is a standalone, UI-free Swift package with hundreds of tests and executable Gherkin specs, including the mathematical identities that certify it (π via Machin, Nicomachus, the Gregorian leap rule…). Read it, audit it, build it yourself.
Donations
The app is free and always will be. If it earns a place in your workflow, a donation keeps the work moving — and is genuinely appreciated.