macOS
brew install bclocal Homebrew formula metadata
sudo port install bcMacPorts ports tree · math/bc/Portfile · source: api.github.com
brew
Arbitrary precision numeric processing language. Version 1.08.2 via Homebrew; verified from local package data.
install
brew install bclocal Homebrew formula metadata
sudo port install bcMacPorts ports tree · math/bc/Portfile · source: api.github.com
sudo apk add bcAlpine Linux edge package indexes · bc · source: dl-cdn.alpinelinux.org
sudo apt install bcDebian stable package indexes · bc · source: deb.debian.org
sudo dnf install bcFedora Rawhide package metadata · bc · source: dl.fedoraproject.org
nix profile install nixpkgs#bcnixpkgs package indexes · pkgs/by-name/bc/bc/package.nix · source: api.github.com
sudo pacman -S bcArch Linux sync databases · bc · source: geo.mirror.pkgbuild.com
sudo zypper install bcopenSUSE Tumbleweed package metadata · bc · source: download.opensuse.org
scoop install main/bcScoop official bucket manifest trees · bucket/bc.json · source: api.github.com
overview
Arbitrary precision numeric processing language
history
bc is the Unix arbitrary-precision calculator language: small enough to be a command-line calculator, but old and standard enough to appear in scripts, POSIX systems, and package-manager bootstrap sets. GNU bc packages both bc and dc, preserving the classic infix calculator and reverse-polish desk-calculator pairing.
The bc language predates GNU bc as a Unix utility for arbitrary-precision arithmetic. POSIX standardizes bc as an arbitrary-precision arithmetic language with an interactive mode, file operands, and the -l math-library option.
GNU bc is the GNU implementation of that utility family. Its documentation describes bc as an arbitrary-precision numeric processing language and ships dc alongside it, keeping the historical relationship between the higher-level bc language and the lower-level desk calculator.
bc became a portable denominator for shell arithmetic that exceeded the shell's integer facilities or needed decimal scale control. Because POSIX specifies it, distribution packages for bc are common across Unix-like systems, and Homebrew, Debian, Fedora, Arch, Nix, MacPorts, Alpine, and others all carry it.
The GNU package matters especially on systems where the base OS does not include GNU userland behavior by default, such as macOS, and in minimal containers where explicit installation keeps scripts reproducible.
Typical command-line use pipes expressions into bc, invokes bc -l for math functions and a nonzero default scale, or runs bc interactively as a tiny programmable calculator. Scripts use it for decimal arithmetic, base conversion, and calculations where shell integer arithmetic is not enough.
The paired dc executable serves users who prefer reverse-polish notation or need the older stack-calculator language.
bc is a package-nerd fossil with live production value: it is tiny, standardized, scriptable, and still frequently pulled into build images because some old configure script, packaging helper, or shell one-liner expects it.
It sits at an interesting boundary between core utility and optional package. On one machine it is part of the assumed Unix furniture; on another it is the missing dependency that breaks a build with a calculator-shaped hole.
security posture
narrow executable package without higher-risk signals.
green risk · low confidence · appliance
Before unattended agent use, check whether the tool reads plaintext credentials, writes remote state, publishes artifacts, or shells out to plugins.
executables
| Command | Kind | Exposure | Note |
|---|---|---|---|
bc | cli | global executable | |
dc | cli | global executable |
freshness
These signals separate page generation age, package-manager activity, and upstream release comparison. Version lag is warned only when an evidence URL and comparable versions are present.
https://www.gnu.org/software/bc/
install metadata
| Package key | brew:bc |
|---|---|
| Version | 1.08.2 |
| Package manager | Homebrew |
| Package manager page | https://formulae.brew.sh/formula/bc |
| Homepage | https://www.gnu.org/software/bc/ |
| Upstream docs | https://www.gnu.org/software/bc |
| License | GPL-3.0-or-later |
| Source archive | https://ftpmirror.gnu.org/gnu/bc/bc-1.08.2.tar.gz |
| Build dependencies | texinfo |
| Uses from macOS | flex, libedit |
| Bottle | available (on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, sonoma, ventura, x86_64_linux) |
| Homebrew post-install | not defined |
| Service | none declared |
registry facts
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | bc |
| Version Scheme | 0 |
| Revision | 0 |
| Conflicts With |
|
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | yes |
| URL Keys |
|
source database matches
Matches are pulled from external package-manager indexes and kept separate from local Automic Vault package links.
bc 1.07.1-4
GNU bc arbitrary precision calculator language
https://www.gnu.org/software/bc/
sudo apt install bcdc 1.07.1-4
GNU dc arbitrary precision reverse-polish calculator
https://www.gnu.org/software/bc/
sudo apt install dcbc
nix profile install nixpkgs#bcbc 1.07.1-3ubuntu4
GNU bc arbitrary precision calculator language
https://www.gnu.org/software/bc/
sudo apt install bcdc 1.07.1-3ubuntu4
GNU dc arbitrary precision reverse-polish calculator
https://www.gnu.org/software/bc/
sudo apt install dcbc 1.08.2-r1
Arbitrary precision numeric processing language (calculator)
https://www.gnu.org/software/bc/bc.html
sudo apk add bcbc-doc 1.08.2-r1
Arbitrary precision numeric processing language (calculator) (documentation)
https://www.gnu.org/software/bc/bc.html
sudo apk add bc-docbc 1.08.2-4.fc44
GNU's bc (a numeric processing language) and dc (a calculator)
https://www.gnu.org/software/bc/
sudo dnf install bcbc 1.08.2-1
An arbitrary precision calculator language
https://www.gnu.org/software/bc/
sudo pacman -S bcbc 1.08.2-1.4
GNU Command Line Calculator
https://www.gnu.org/software/bc/
sudo zypper install bcbc
sudo port install bcmain/bc
scoop install main/bcsource trail
This page is generated by av-web from the private package SQLite artifact built by scripts/generate-pkg-sqlite.py.
View the package source record on GitHub.