A modern, feature-rich calculator desktop application built with Electron.js, featuring both basic arithmetic and advanced mathematical functions.
- Addition (+)
- Subtraction (−)
- Multiplication (×)
- Division (÷)
- Percentage (%)
- Power (x^y)
- Square Root (√)
- Sine (sin)
- Cosine (cos)
- Tangent (tan)
- Natural Logarithm (ln)
- Base-10 Logarithm (log)
- Modern glassmorphic design with gradient background
- Responsive button animations
- History display showing current operation
- Number formatting with commas
- Scientific notation for very large/small numbers
- Numbers: 0-9
- Decimal: .
- Operators: +, -, *, /
- Equals: Enter or =
- Clear: Escape
- Delete: Backspace
- Percentage: %
- Power: ^
-
Navigate to the electronjs directory:
cd electronjs -
Install dependencies:
npm install
Start the calculator with:
npm startFor development mode:
npm run devThe calculator has been packaged as a standalone Windows executable:
- Direct Execution: Navigate to
dist/win-unpacked/and runModern Calculator.exe - Easy Launch: Double-click
run-calculator.batin the project root
The executable is completely self-contained and doesn't require Node.js or any dependencies to be installed on the target machine.
electronjs/
├── main.js # Main Electron process
├── index.html # Calculator UI structure
├── styles.css # Modern styling and animations
├── calculator.js # Calculator logic and functionality
├── package.json # Project dependencies and scripts
└── README.md # This file
- Electron.js: Cross-platform desktop application framework
- HTML5: Structure and semantics
- CSS3: Modern styling with animations and transitions
- JavaScript: Calculator logic and event handling
- Glassmorphic UI: Translucent background with blur effects
- Gradient Backgrounds: Modern color transitions
- Button Animations: Ripple effects and hover states
- Responsive Design: Adapts to different screen sizes
- Error Handling: Graceful handling of invalid operations
The calculator supports both degrees and radians for trigonometric functions. Advanced functions are evaluated using JavaScript's built-in Math object for accuracy.
MIT License