# Install calc with Homebrew, apt, dnf, MacPorts, Nix, pacman, zypper

Arbitrary precision calculator. Version 2.17.0.0 via Homebrew; verified 2026-06-22.

## Install

```sh
sudo av install brew:calc
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install calc
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install calc
```

  Evidence: MacPorts ports tree: math/calc/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- Debian apt (92%):

```sh
sudo apt install calc
```

  Evidence: Debian stable package indexes: calc from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install calc
```

  Evidence: Fedora Rawhide package metadata: calc from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#calc
```

  Evidence: nixpkgs package indexes: pkgs/by-name/ca/calc/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S calc
```

  Evidence: Arch Linux sync databases: calc from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install calc
```

  Evidence: openSUSE Tumbleweed package metadata: calc from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst

## Package facts

- **Package key:** brew:calc
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/calc>
- **Version:** 2.17.0.0
- **Source summary:** Arbitrary precision calculator
- **Homepage:** <http://www.isthe.com/chongo/tech/comp/calc/>
- **Repository:** <https://github.com/lcn2/calc>
- **Upstream docs:** <http://www.isthe.com/chongo/tech/comp/calc>
- **License:** LGPL-2.1-or-later
- **Source archive:** <https://github.com/lcn2/calc/archive/refs/tags/v2.17.0.0.tar.gz>
- **Last updated:** 2026-06-22T14:02:56-07:00
- **Generated:** 2026-07-08T18:08:21+00:00

## Executables

- calc (cli)
- calc (alias)

## Dependencies

- readline

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 2.17.0.0
- Package-manager updated: 2026-06-22
- Local data: ok
- Upstream repository: https://github.com/lcn2/calc
- info: No cached GitHub release or tag data was available.
## Project history and usage

calc is a long-running arbitrary-precision calculator with an interactive shell, a C-like expression language, exact rational arithmetic, complex numbers, and programmable functions. Its package history is unusually old-school: a Unix mathematical tool maintained through tarballs, mirrors, distro packages, and now GitHub releases.

### Project history

The official author page says most of calc was written by David I. Bell, with source and releases maintained by Landon Curt Noll, and credits Ernest W. Bowen plus others for numerical and help-file improvements. It also notes that portions derived from earlier public-domain arbitrary-precision routines posted to the net around 1984, though little recognizable code remained.

The official README presents calc as an interactive calculator that can also execute a single command from the shell. It supports huge integer arithmetic, exact fractions, complex numbers, transcendental functions, variables, loops, and user-defined functions in a C-like language.

The current CHANGES file shows active maintenance into the 2020s, including XDG Base Directory support and a 2026 2.17.0.0 line that synchronizes changes from the newer 3.0 work while keeping a legacy branch for very old systems.

### Adoption history

calc has been packaged broadly across Unix-like systems because it fills the gap between simple desk calculators, `bc`, and larger computer algebra systems. The repository README gives install examples for yum, pacman, apt, dnf, Termux, and source builds, matching its presence in many package managers.

Its adoption is strongest among users who want scriptable exact arithmetic without pulling in a full CAS. Landon Curt Noll's pages also connect calc scripts to large-prime and astronomical interests, a good example of how small Unix math tools become personal research infrastructure.

### How it is used

Users run `calc` interactively, pass an expression as a command-line argument, or write scripts in calc's C-like language. Typical package-manager usage is installing the binary and then relying on it for precise integer, rational, modular, complex, and high-precision floating calculations.

The tool supports startup configuration through `calcrc` paths, with recent release notes documenting XDG Base Directory adoption alongside the older `~/.calcrc` convention.

### Why package nerds care

calc matters to package nerds because it is a preserved lineage of pre-Git, pre-GitHub Unix numerics that still receives modern portability work. It is not just another calculator: it is a programmable arbitrary-precision environment small enough for base developer workflows.

It is also a reminder that package ecosystems carry historical software forward. The same package is at home in Debian, Fedora, Arch, Homebrew, MacPorts, Nix, Termux, and source tarballs, because the CLI contract has stayed useful for decades.

### Timeline

- 1984: Earlier public-domain arbitrary-precision routines were posted to the net, later influencing calc's ancestry.
- 1990s-2000s: calc circulated as source, binaries, and mirrored tarballs maintained by Landon Curt Noll.
- 2022: Official calc web pages point users to GitHub releases and the GitHub source repository.
- 2026: CHANGES documents calc 2.17.0.0 work, including C17 expectations, XDG Base Directory support, and a legacy branch for old systems.

### Related projects

- Related tools include `bc`, `dc`, GNU bc, PARI/GP, Python's decimal and fractions modules, Maxima, and small Unix math utilities. calc occupies the middle ground: scriptable and exact like `bc`, but with a richer C-like language and built-in math library.

### Sources

- <http://www.isthe.com/chongo/tech/comp/calc/calc-author.html>
- <http://www.isthe.com/chongo/tech/comp/calc/calc-whatis.html>
- <http://www.isthe.com/chongo/tech/comp/calc/index.html>
- <https://github.com/lcn2/calc/blob/master/CHANGES>
- <https://github.com/lcn2/calc/blob/master/README.md>


## Security Notes

No matching local secret-handling manifest was found for calc. Nucleus package metadata is still published here so future coverage has a stable package URL.



## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: ${XDG_CONFIG_HOME:-$HOME/.config}/calc/calcrc, ~/.calcrc
## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** calc
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

## Other Package-Manager Records

- Debian apt - calc - 2.15.1.0-1: normalized package name match | Debian stable package indexes: calc from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Arbitrary precision calculator | http://www.isthe.com/chongo/tech/comp/calc/
- Debian apt - calc-common - 2.15.1.0-1: normalized package name match | Debian stable package indexes: calc-common from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Arbitrary precision calculator (common files) | http://www.isthe.com/chongo/tech/comp/calc/
- Debian apt - calc-dev - 2.15.1.0-1: normalized package name match | Debian stable package indexes: calc-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Library for arbitrary precision arithmetic | http://www.isthe.com/chongo/tech/comp/calc/
- Nix - calc: normalized package name match | nixpkgs package indexes: pkgs/by-name/ca/calc/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - calc - 2.15.0.4-1build2: normalized package name match | Ubuntu 24.04 LTS package indexes: calc from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Arbitrary precision calculator | http://www.isthe.com/chongo/tech/comp/calc/
- Ubuntu apt - calc-common - 2.15.0.4-1build2: normalized package name match | Ubuntu 24.04 LTS package indexes: calc-common from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Arbitrary precision calculator (common files) | http://www.isthe.com/chongo/tech/comp/calc/
- Ubuntu apt - calc-dev - 2.15.0.4-1build2: normalized package name match | Ubuntu 24.04 LTS package indexes: calc-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Library for arbitrary precision arithmetic | http://www.isthe.com/chongo/tech/comp/calc/
- dnf - calc - 2.16.1.2-1.fc44: normalized package name match | Fedora Rawhide package metadata: calc from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Arbitrary precision arithmetic system and calculator | http://isthe.com/chongo/tech/comp/calc/
- dnf - calc-devel - 2.16.1.2-1.fc44: normalized package name match | Fedora Rawhide package metadata: calc-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Development files for the calc arithmetic system | http://isthe.com/chongo/tech/comp/calc/
- dnf - calc-libs - 2.16.1.2-1.fc44: normalized package name match | Fedora Rawhide package metadata: calc-libs from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Libraries for the calc arithmetic system | http://isthe.com/chongo/tech/comp/calc/
- dnf - calc-stdrc - 2.16.1.2-1.fc44: normalized package name match | Fedora Rawhide package metadata: calc-stdrc from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Standard resource files the calc arithmetic system | http://isthe.com/chongo/tech/comp/calc/
- pacman - calc - 2.17.0.0-1: normalized package name match | Arch Linux sync databases: calc from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Arbitrary precision console calculator | https://github.com/lcn2/calc
- zypper - calc - 2.16.1.2-1.3: normalized package name match | openSUSE Tumbleweed package metadata: calc from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | C-style arbitrary precision calculator | http://www.isthe.com/chongo/tech/comp/calc/index.html
- zypper - calc-devel - 2.16.1.2-1.3: normalized package name match | openSUSE Tumbleweed package metadata: calc-devel from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Development files for libcalc | http://www.isthe.com/chongo/tech/comp/calc/index.html
- zypper - libcalc2_16_1_2 - 2.16.1.2-1.3: normalized package name match | openSUSE Tumbleweed package metadata: libcalc2_16_1_2 from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Arbitrary precision math library | http://www.isthe.com/chongo/tech/comp/calc/index.html
- MacPorts - calc: normalized package name match | MacPorts ports tree: math/calc/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Related links

- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Networking and protocol packages](https://www.automicvault.com/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Scientific computing packages](https://www.automicvault.com/pkg/scientific-computing-tools/) - Matched scientific computing metadata.
- [Web development packages](https://www.automicvault.com/pkg/web-dev-tools/) - Matched web development metadata.
- [cddlib](https://www.automicvault.com/pkg/brew/cddlib/) - Shares av.db curated category or tags: cli, mathematics, science.
- [fplll](https://www.automicvault.com/pkg/brew/fplll/) - Shares av.db curated category or tags: cli, mathematics, science.
- [maxima](https://www.automicvault.com/pkg/brew/maxima/) - Shares av.db curated category or tags: cli, mathematics, science.
- [pari](https://www.automicvault.com/pkg/brew/pari/) - Shares av.db curated category or tags: cli, mathematics, science.
- [ppl](https://www.automicvault.com/pkg/brew/ppl/) - Shares av.db curated category or tags: cli, mathematics, science.
- [primecount](https://www.automicvault.com/pkg/brew/primecount/) - Shares av.db curated category or tags: cli, mathematics, science.
- [singular](https://www.automicvault.com/pkg/brew/singular/) - Shares av.db curated category or tags: cli, mathematics, science.
- [sollya](https://www.automicvault.com/pkg/brew/sollya/) - Shares av.db curated category or tags: cli, mathematics, science.
- [libqalculate](https://www.automicvault.com/pkg/brew/libqalculate/) - Local package facts share a topical domain. Shared terms: calculator, cli, readline, science.

## Combined YAML source

View the package source record on GitHub. [combined/calc.yml](https://github.com/automic-vault/db/blob/main/combined/calc.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated configuration and credential file locations
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
