A sleek and intelligent web-based calculator built using HTML, CSS, and JavaScript, hosted on GitHub Pages.
It’s designed to be fast, responsive, and smart — with proper handling for negative numbers, operator spam prevention, and instant error feedback.
🔗 View it here → https://naman9104.github.io/Calculator/
- ✅ Perform basic arithmetic operations —
+,-,*,/,% - ✅ Smart operator handling (no
++,*/, etc.) - ✅ Supports negative numbers like
-5 + 4 - ✅ “Error” clears with one Backspace or Delete click
- ✅ Works with keyboard inputs
- ✅ Fully responsive & minimal UI design
The calculator listens for both button clicks and keyboard input,
and uses safe JavaScript logic to evaluate expressions.
It also prevents:
- Consecutive operator inputs
- Invalid endings like
5+or9*/ - Starting with invalid symbols (except
-)
| Part | Technology |
|---|---|
| Structure | HTML5 |
| Styling | CSS3 |
| Logic | JavaScript (ES6) |
| Hosting | GitHub Pages |
You can run this calculator on your system easily:
# Clone this repository
git clone https://github.com/naman9104/Calculator.git
# Open the folder
cd Calculator
# Run the app
open index.html