A simple and fully working JavaScript calculator made using HTML, CSS, and JavaScript.
It includes both basic arithmetic functions and scientific functions.
JavaScript Calculator - Live Demo

- Addition (+)
- Subtraction (-)
- Multiplication (×)
- Division (÷)
- Percentage (%)
- Backspace and Clear
- Keyboard input support
- Square Root (sqrt)
- Power (x^y)
- sin(x)
- cos(x)
- tan(x)
- Natural Log (ln)
- Log base 10 (log)
- Clean and modern design
- Shows both expression and result
- History of calculations with timestamps
- Scientific panel toggle button
- Responsive layout for different screen sizes
calculator.html # Contains HTML, CSS, and JavaScript in a single file
- JavaScript (ES6): events, functions, expression evaluation, DOM manipulation
- HTML5: clean structure
- CSS3: layout, styling, responsive design
- Debugging and problem-solving
- Basic UI/UX design
- HTML5
- CSS3
- JavaScript (ES6)
- The calculator reads the expression as text
- Safely evaluates the expression through controlled JavaScript functions
- Scientific operations use the built-in Math library
- History is stored during the browser session
- Dark/Light mode switch
- Move CSS and JS into external files
- Add memory functions (M+, M-, MR)
- Add degrees/radians toggle for scientific functions
This project is open-source and free to use or modify.
Balaji P