A simple, responsive calculator built with HTML, CSS, and JavaScript. Supports mouse and keyboard input.
Open the app directly:
- Double-click index.html
Or serve locally (recommended):
- Python 3:
python3 -m http.serverthen visit http://localhost:8000
- Basic operations: add, subtract, multiply, divide
- Equals, clear (AC), toggle sign (±), percent (%)
- Decimal input
- Keyboard support
- Digits: 0–9
- Decimal: .
- Operators: +, -, *, /
- Evaluate: Enter or =
- Clear: C
- Delete last: Backspace
- Percent: %
- index.html — markup and calculator controls
- styles.css — layout, theming (light/dark support), responsive styles
- script.js — calculator state, operations, and keyboard handling
- No build tools required; pure static files
- Accessible output region with aria-live for display updates
- Thousand separators in display for readability
MIT