This is a simple web-based calculator created using HTML, CSS, and JavaScript.
It provides basic arithmetic operations and a clean user interface.
- Basic arithmetic operations: Addition, Subtraction, Multiplication, Division
- Supports percentage calculations
- Clear
ACbutton to reset the input - Delete
DELbutton for deleting the last entered value - Decimal point support
- Responsive design for better usability on different screen sizes
You can try the calculator live at: Web.calculator
-> calculator-project
│
├── index.html # Main HTML file
├── style.css # Styles for the calculator
└── script.js # JavaScript logic for calculator functionalityTo use this calculator
- Fork this repo to yours.
- Clone your forked repo:
git clone https://github.com/your-username/web.calculator.git
- Run the
indexfile in your Browser>
-
HTML:
The main structure of the calculator is defined in the index.html file. It consists of buttons for numbers and operators, and an input field for displaying the result. -
CSS:
Basic styles for layout and responsiveness are written in the style.css file. You can customize the appearance by modifying this file. -
JavaScript:
The core logic of the calculator is handled by script.js. This file processes user input and performs arithmetic operations.
- Button clicks are captured, and the input is updated accordingly.
- The
=button evaluates the expression and displays the result. - The
ACbutton resets the calculator, while theDELbutton removes the last digit.
License
This project is open-source and free to use. Feel free to modify and share as per your needs.