A simple, responsive web-based calculator built with HTML, CSS, and JavaScript.
This project performs basic arithmetic operations and is designed to be beginner-friendly, making it a good starting point for contributors.
- Basic operations: addition, subtraction, multiplication, division
- Clear (C) and equals (=) functionality
- Responsive UI with styled buttons
- Error handling for invalid inputs
- Lightweight and fast – no dependencies
You can run the calculator locally by opening index.html in your browser.
(Optionally, maintainers can enable GitHub Pages for a live demo.)
- Clone the repository:
git clone https://github.com/codeshiva10/calculator.git
- Navigate into the folder:
cd calculator - Open index.html in your browser. That’s it!
Contributions are welcome!
Here are some ideas you can help with:
- Add keyboard support for inputs
- Improve accessibility (ARIA labels, color contrast)
- Add percentage and sign toggle (±) functions
- Replace
evalwith a safer expression parser - Improve styling and animations
To contribute:
- Fork the repo
- Create a new branch (
git checkout -b feat-new-feature) - Commit your changes (
git commit -m "Add new feature") - Push to your fork (
git push origin feat-new-feature) - Open a Pull Request 🎉