libqalculate puts the whole calculator engine in a library other apps link against
Qalculate! library and CLI
At a glance
- What is it?
- The engine behind the Qalculate! desktop calculator ships as source with an automake build chain, and the README is more precise about which build step is optional than about what the optional libraries actually do.
- Who is it for?
- libqalculate earns its place when a calculation has to be exact, unit aware or symbolic rather than roughly numeric: arbitrary precision in both rational and floating point forms, over 400 units with automatic and explicit conversion, propagation of uncertainty and interval arithmetic, factorisation and integration, and element-wise calls that return vectors.
- Can I use it commercially?
- Yes, with conditions. GPL-2.0 is a copyleft licence: if you distribute software that includes it, you must release that software's source code under the same licence. Running it internally without distributing it does not trigger that obligation.
- Is it still maintained?
- Yes. The repository last received commits 8 days ago.
- What is it written in?
- Mainly C++, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 14, 2026, and from our analysis. They are not legal advice.
Star history
- Qalculate/libqalculate2,728 ★ · +46
| Repository | 2026-09-29 | 2026-11-14 |
|---|---|---|
| Qalculate/libqalculate | 2.7k | 2.7k |
46 Stars in the last 46 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
autogen.sh is the Git only step, and it also builds the docs
Compiling from the repository and compiling from a release tarball are two different paths, and the README separates them with one sentence: `./autogen.sh` is not required when you use a release source tarball and is needed only for the Git version. The same list notes that `./configure` is run automatically by autogen.sh, so the pair as printed is redundant on the Git path. Below them sit make, make install as root, and ldconfig if necessary.
./autogen.sh
./configure
make
sudo make install
ldconfigautogen.sh carries a second, less obvious job. The API documentation is generated when it runs, and the HTML is installed into $docdir/libqalculate/html, usually /usr/share/doc/libqalculate/html. So the step the README calls unnecessary for tarballs is also the step that produces the reference manual, while a separately worded paragraph says the documentation ships inside the package. Whether a tarball build regenerates the HTML or only copies what the maintainer generated is not stated.
The /usr/local default prefix costs a second root command
The default prefix for the install step is /usr/local, and the README spells out what follows from that. Once the library lands there, the dynamic linker will not find it until /usr/local/lib joins the library path: the instruction is to add that directory to a file under /etc/ld.so.conf.d/ and run ldconfig. A library build therefore turns into two privileged commands, sudo make install and then ldconfig, and the second one is easy to forget until something fails to link at runtime.
Not building is the other option. The downloads page at https://qalculate.github.io/downloads.html carries installers and binary packages for released versions, and the same site hosts the manual and the screenshots. The gap between the two routes is reproducibility. A tarball from that page is a released version, while ./autogen.sh inside a checkout builds whatever the branch holds that day, and the two are not the same code for anyone who needs a fixed dependency.
Recommended libraries sit beside features the README promises
The requirements have three tiers. GMP and MPFR and libxml2 are required. libcurl, icu and gettext are recommended. iconv and readline are recommended for the CLI. Gnuplot and doxygen are optional. On Linux distributions that split libraries into separate development packages, those development packages have to be installed before compilation, and libmpfr-dev is the example the README gives.
The feature list then advertises capabilities that sit right next to that second tier. Currency conversion is described as working with daily updated exchange rates, and libcurl is the plausible mechanism for fetching them, yet the requirements mark it recommended rather than required and never say which component performs the download. Plotting is tighter: the feature list says plots and graphs use Gnuplot and can be saved as image files, and Gnuplot is listed as optional, so a build without it loses that part of the interface. Whether an install without libcurl still updates exchange rates is not something the documentation settles.
cbrt(-27) and (-27)^(1/3) do not return the same number
The expression gallery is the best evidence for how the parser behaves, and its first entries show a distinction that catches people out. A named root function asks for a real root, while raising a negative base to a fractional power takes the principal complex root.
cbrt(-27) # = root(-27; 3) = −3 (real root)
(-27)^(1/3) # ≈ 1.5 + 2.5980762i (principal root)Arguments apply element-wise across a list, so a multi-argument call returns a vector rather than one number, and a bare function name without parentheses works as well:
sqrt(25; 16; 9; 4) # = [5 4 3 2]
ln 25 # = log(25; e) ≈ 3.2188758The argument separator is the semicolon, and the note attached to the gallery says it can be replaced with a comma only when the comma is not acting as a decimal or thousands separator. Exact and approximate output coexist too, with sqrt(32) reported as 4 × √(2) in exact mode. The gallery itself is fenced with the language tag R, though what it holds are calculator expressions.
qalc takes an expression, or turns into an interactive program
The command line program has two modes. Handed an expression it prints a result and exits, and qalc --help covers the options that apply to that non-interactive form.
qalc 5+2
qalc --help
man qalcRun with no expression at all, it becomes an interactive session with history and completion, where you can manipulate the result and change settings, and the word help entered inside that session lists the rest. So the man page, qalc --help and the in-session help cover three different surfaces, and they are not the same list.
Documentation for the surrounding library is split across more surfaces again: the man page for qalc, the online manual at qalculate.github.io/manual/qalc.html, and the API reference for library users. The reference is linked over plain http at qalculate.github.io/reference/index.html, while the downloads page and the project homepage are https, a small inconsistency in a project that otherwise repeats its own URLs carefully.
Two READMEs, three translation directories, one pkg-config template
The repository root is crowded for a library, and the entries say where the work sits. Build files: Makefile.am, configure.ac, autogen.sh, m4/. Documentation and news: docs/, man/, README, README.md, README.translate, INSTALL, NEWS, ChangeLog, TODO. Translations: po/, po-defs/ and po-defs-fixed/, the last of them sitting beside the other two with its name the only clue to how it differs, plus ABOUT-NLS. Then data/, libqalculate/, src/, tests/ and libqalculate.pc.in.
The pkg-config template matters more than the .in suffix suggests. Any C++ program that links this library, including the desktop shells and the KDE components further down the same README, resolves its compile and link flags through that file, and the template is what configure turns into the installed libqalculate.pc. Its place at the root is the clearest sign that libqalculate is packaged to be consumed by other projects, and not only by the CLI built beside it.
One version number covers the library, the CLI and the apps on top
Every release title carries both halves of the project: v5.12.0 is published as Qalculate! version 5.12 (library and CLI), following v5.11.0 on 2026-05-25 and v5.10.0 on 2026-03-30. That is a release roughly every six to eight weeks, with the library and the command line program versioned as one artifact, so pinning libqalculate also pins qalc.
The branch runs ahead of that series. v5.12.0 was tagged on 2026-07-13 and the last push arrived on 2026-10-03, so a checkout is close to three months of work past the newest tarball, and building that checkout is exactly the case where automake and autoconf become mandatory.
The consumer list is the reason the versioning matters. qalculate-gtk and qalculate-qt are the main user interfaces. The Qalculator web app also ships as apps for Android, iOS and Windows, and a separate Qalculate for Android repository exists. KDE Plasma Workspace, Cantor and Step all sit on top of the library, and an add-on repository supplies ancient units, which is the route for definitions the bundled set does not carry.
Editorial conclusion
libqalculate earns its place when a calculation has to be exact, unit aware or symbolic rather than roughly numeric: arbitrary precision in both rational and floating point forms, over 400 units with automatic and explicit conversion, propagation of uncertainty and interval arithmetic, factorisation and integration, and element-wise calls that return vectors. What you accept in exchange is a build chain rather than a package, since automake, autoconf, GMP, MPFR and libxml2 all have to be in place before the first make, and the default /usr/local prefix costs a second privileged command so the linker can see the library. Decide deliberately between the released tarball and the branch, because on 2026-10-03 those are different code.
Frequently asked questions
What is a CLI calculator?
That question is about calculators in general, and this repository only records one specific case. libqalculate ships a command line program named qalc. Run it with an expression for a single calculation, as in qalc 5+2, or with no expression to enter an interactive session with history and completion where help lists the rest.
What is the command to use a calculator in Linux?
The only command the README offers for that is qalc, written as qalc mathematical expression with qalc 5+2 as the worked example. It points at man qalc for the option list and at qalc --help for the non-interactive options. Nothing about other calculators appears in this repository.
What does libqalculate need before it can be built?
GMP and MPFR plus libxml2 are required. libcurl, icu and gettext are recommended, iconv and readline are recommended for the CLI, and Gnuplot and doxygen are optional. Compiling the Git code additionally needs automake and autoconf, and on distributions that ship separate development packages those must be installed first, with libmpfr-dev given as the example.
What license is libqalculate under?
GPL-2.0, with the license text kept in a COPYING file at the repository root. The README itself does not discuss licensing terms and sends readers to the project website for downloads, so the COPYING file is where that fact is recorded.
Does libqalculate update currency rates without a network library?
The feature list promises currency conversion with daily updated exchange rates, while libcurl appears in the requirements as recommended rather than required. The README does not say which component performs the download, so a build without libcurl is not covered by what is written here.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/qalculate-libqalculate)Star history chart for your README
[](https://hysenlabs.com/projects/qalculate-libqalculate)Was this useful?