A modern, responsive calculator built with HTML, CSS, and JavaScript featuring a sleek dark theme and intuitive interface.
- Basic Operations: Addition (+), subtraction (−), multiplication (×), division (÷)
- Advanced Functions:
- Percentage calculations (%)
- Plus/minus toggle (±)
- Backspace (⌫)
- All clear (AC)
- Real-time Expression Display: Shows the complete calculation as you type
- Error Handling: Division by zero protection
- Responsive Design: Clean, modern interface with smooth animations
- Open
index.html
in your web browser - Click number buttons to input values
- Use operator buttons for calculations
- Press
=
to evaluate expressions - Use
AC
to clear everything or⌫
to delete last character
calculator/
├── index.html # Main HTML structure
├── style.css # Styling and layout
└── script.js # Calculator logic and event handling
To run locally:
- Clone the repository
- Open
index.html
in your browser - No build process required - pure vanilla JavaScript
Works in all modern browsers that support ES6+ JavaScript features.