-
Basic Arithmetic Operations
Supports addition, subtraction, multiplication, and division. -
Parentheses Support
Automatically balances open and close parentheses for complex expressions. -
Live Calculation History
Stores the last 5 calculations for quick reference. -
Mobile-Friendly Interface
Clean, responsive design suitable for mobile and desktop screens. -
Interactive UI
Modern glass-like backgrounds, blur effects, and smooth button interactions. -
Error Handling
Detects invalid expressions and displays "Error" without crashing.
-
Frontend:
- React.js – fast, component-based UI library
- Vite – development server and build tool
- Tailwind CSS – utility-first styling
- Math.js – safe evaluation of mathematical expressions
- Lucide-React – icons for UI elements
-
State Management & Hooks:
useState– managing input, result, and historyuseEffect– updating timestamps and reactive UI
-
Clone the repository: git clone https://github.com/m223rx/calculator.git cd calculator/frontend
-
Install dependencies: npm install
-
Run the development server: npm run dev
Update TailwindCSS variables to change colors and theme. Adjust the handleResult function to modify precision or rounding logic. Add more advanced math functions by extending Math.js integration.
src/ ├── components/ │ ├── phone.jsx │ └── navbar.jsx ├── assets/ │ └── screenshots/ ├── App.jsx ├── main.jsx ├── App.jsx └── index.css
Add scientific calculator functionality (sin, cos, log, etc.) Enable dark/light themes toggle Support keyboard input in addition to on-screen buttons Animate button presses and results for a smoother UX
m223rx – 2025 © 2025 m223rx. All rights reserved.


