A sleek, glassmorphism-styled calculator built with pure HTML and inline CSS — no frameworks, no dependencies.
- Glassmorphism UI — dark gradient background with frosted-glass card
- Full arithmetic — addition, subtraction, multiplication, division
- Extra operations — percentage (
%) and sign toggle (+/-) - Expression history — shows the running expression above the result
- Smart display — font scales down automatically for long numbers
- Keyboard support — use number keys, operators,
Enter,Backspace, andEscape - Zero dependencies — single
index.htmlfile, works offline
| Key | Action |
|---|---|
0–9 |
Input digit |
+ - * / |
Set operator |
. |
Decimal point |
Enter or = |
Calculate |
Backspace |
Delete last digit |
Escape |
Clear all (AC) |
# Clone the repo
git clone https://github.com/Ani1967/calculator.git
cd calculator
# Serve with Python (any port)
python3 -m http.server 56789Then open http://localhost:56789 in your browser.
open index.htmlcalculator/
└── index.html # Everything — markup, styles, and logic in one file
Deploy via GitHub Pages: go to Settings → Pages → Branch: main → / (root) and the calculator will be live at
https://ani1967.github.io/calculator/
MIT — free to use, modify, and distribute.