A simple cross-platform desktop calculator with Material Design dark/light theme, built with Fyne and expr-lang/expr.
| On Rocky Linux - dark theme | On Windows 11 - light theme |
![]() |
![]() |
- Basic arithmetic:
+,-,×,÷ - Unary operations:
1/x,x²,√x,%,± - Parentheses and expression chaining
- Keyboard input support
- History panel with expression recovery
- Clipboard copy/paste
- Memory: MC, MR, M+, M-
- π constant
- Division-by-zero protection (AST-level)
- i18n: English / Русский (auto-detected, override with
-locale=ru) - Dark & light themes (follows system)
Linux:
# Debian/Ubuntu
sudo apt install gcc pkg-config libgl1-mesa-dev libegl1-mesa-dev \
libxrandr-dev libxcursor-dev libxinerama-dev libxi-dev \
libxkbcommon-dev libwayland-dev
# Rocky/RHEL
sudo dnf install gcc pkgconfig mesa-libGL-devel mesa-libEGL-devel \
libXrandr-devel libXcursor-devel libXinerama-devel libXi-devel \
libxkbcommon-devel wayland-develWindows (cross-compile from Linux):
sudo dnf install mingw64-gcc
make build-windowsWindows (native-compile from Windows):
install mingw64-gcc
go mod tidy
go build -ldflags="-s -w -H=windowsgui" -o calculator.exe .macOS: Xcode Command Line Tools.
make build # Linux
make build-windows # Windows .exe
make run # build + launchOr manually:
go build -ldflags="-s -w" -o calculator .
./calculator- Type expressions directly or use the on-screen buttons
- Press
=orEnterto evaluate Backspaceto delete last character,Escapeto clear- Click history entries to restore an expression
%works as percentage of the preceding value (e.g.100+10%→110)- Press
=repeatedly to repeat the last operation
├── main.go # GUI and calculator logic
├── theme.go # Material Design theme (dark/light)
├── i18n.go # Localization (EN/RU)
├── validator.go # Zero-division AST checker
├── Makefile # Build automation
MIT

