A lightweight, modern calculator built with plain HTML, CSS, and JavaScript. It runs locally in your browser, works offline, and has no external dependencies.
- Responsive dark interface with keyboard support
- Addition, subtraction, multiplication, division, and percentage
- Calculation history for the current session
- Clear, sign toggle, decimal input, and backspace via keyboard
- Arithmetic parser implemented without
eval()or dynamic code execution - No network requests, analytics, cookies, or third-party packages
- Download or clone this repository.
- Open
index.htmlin any modern browser. - Start calculating — no installation or build step required.
git clone https://github.com/griffin20244/Simple-Calculator.git
cd Simple-CalculatorThen open index.html in your browser.
| Key | Action |
|---|---|
0–9, . |
Enter a number |
+, -, *, / |
Arithmetic operators |
% |
Percentage |
Enter or = |
Calculate |
Backspace |
Delete the last character |
Esc or Delete |
Clear |
Version 2 is a fresh, dependency-free rebuild with a responsive UI, keyboard input, session history, and safer expression parsing.
See CHANGELOG.md for release notes.
Copyright (C) 2026 griffin20244.
This project is licensed under the GNU General Public License v3.0 only (GPL-3.0-only). See LICENSE for the complete license text.
The GPL permits use, study, modification, and redistribution, while requiring distributed modified versions covered by the license to preserve notices and provide corresponding source under GPL terms. It is designed to keep derivative distributions open; it does not prevent every form of copying or guarantee enforcement by itself.
Please retain the copyright and license notices when redistributing this project. If you publish a modified version, clearly mark your changes and provide the corresponding source as required by the license.
Bug reports and improvements are welcome through GitHub Issues and Pull Requests. Please keep contributions compatible with GPL-3.0-only and do not submit code you do not have the right to contribute.
This software is provided “as is”, without warranty of any kind, to the extent permitted by applicable law.