fend
Arbitrary-precision calculator with unit conversions, complex numbers, and D&D dice rolls
fend is a command-line calculator that performs arbitrary-precision arithmetic using rational numbers. Unlike standard calculators, it maintains full precision for all calculations and includes comprehensive unit conversion support covering SI, US customary, UK customary, and historical units. The tool handles complex number operations, trigonometric functions, and supports number bases from binary to base-36.
The calculator includes several distinctive features for different use cases. It can perform D&D-style dice rolls with commands like 'roll 4d6', supports variable assignment for reusing calculated values, and provides lambda calculus functionality. The CLI uses Emacs-style shortcuts for navigation and editing.
fend targets users who need precise calculations with unit awareness, from engineers and scientists requiring exact arithmetic to gamers needing dice roll functionality. It runs as a REPL session where users can perform calculations like '5'10" to cm' for unit conversions or '100 C to F' for temperature conversions. The tool is also available as a web interface and can be integrated into other applications through WebAssembly packages.
Installation
# via Homebrew
brew install fend
# via Cargo
cargo install fend
# via Winget
winget install fend
Alternatives & related tools
clipse
Configurable clipboard manager with TUI interface for Linux, macOS, and Unix systems supporting text and image history.
tz
Interactive TUI tool for displaying and comparing times across multiple time zones simultaneously
dstask
Terminal-based TODO manager with git-based sync and markdown notes per task
bookokrat
Terminal EPUB/PDF/DJVU reader with Vim-style keybindings, split layout, and SyncTeX support for LaTeX workflows
basalt
Terminal user interface (TUI) for managing Obsidian vaults and notes from the command line
add a badge to your README
Maintain fend? Show that it's featured on trmn. The badge links back to this page.
[](https://www.trmn.sh/tools/fend?utm_source=badge)<a href="https://www.trmn.sh/tools/fend?utm_source=badge"><img src="https://www.trmn.sh/badge/fend.svg" alt="Featured on trmn" height="20"></a>