LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

qalc

Command-line calculator with unit conversion

TLDR

Calculate expression
$ qalc "[2 + 2]"
copy
Convert units
$ qalc "[5 kilometers to miles]"
copy
Interactive mode
$ qalc
copy
Currency conversion
$ qalc "[100 USD to EUR]"
copy
Scientific calculation
$ qalc "[sin(45 degrees)]"
copy
Display result in hexadecimal
$ qalc -b 16 "[255]"
copy
Terse output (result only, useful in scripts)
$ qalc -t "[2^16]"
copy

SYNOPSIS

qalc [options] [expression]

DESCRIPTION

qalc is the command-line interface to the Qalculate library, providing a powerful calculator with support for mathematical expressions, unit conversions, currency exchange, and symbolic computation. It handles everything from basic arithmetic to complex expressions involving trigonometric functions, logarithms, integrals, and physical constants.A standout feature is built-in awareness of physical units and currencies, allowing natural expressions like "5 kilometers to miles" or "100 USD to EUR". Exchange rates can be updated automatically. In interactive mode, qalc provides a persistent session with command history and tab completion.

PARAMETERS

EXPRESSION

Mathematical expression to evaluate.
-t, --terse
Reduce output to just the result.
-f FILE, --file FILE
Execute commands from a file first.
-e, --exrates
Update exchange rates.
-b BASE, --base BASE
Set the number base for results.
-c, --color
Use colors to highlight expressions and results.
-i, --interactive
Start in interactive mode.
-l [TERM], --list [TERM]
List matching variables, functions, units, and prefixes.
-s "OPTION VALUE", --set "OPTION VALUE"
Set a configuration option (e.g., -s "base 16").
-p [BASE], --prog [BASE]
Start in programming mode with base conversion.
-n, --nodefs
Do not load any functions, units, or variables from file.

INSTALL

sudo apt install qalc
copy
sudo apk add qalc
copy

CAVEATS

Requires libqalculate. Supports currency exchange rates.

HISTORY

Qalculate was created as a multi-purpose calculator with unit support.

SEE ALSO

bc(1), calc(1), units(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid