A modern, feature-rich equation solver with an elegant user interface
Features • Getting Started • Usage • Documentation • License
EquaSolver is a comprehensive web-based calculator designed to solve various types of mathematical equations with an intuitive and visually appealing interface. Built entirely with vanilla JavaScript, HTML5, and CSS3, it requires no installation or dependencies, making it accessible directly from any modern web browser.
- Standard Calculator - Perform basic arithmetic operations with a familiar interface
- Linear Equations (ax + b = 0) - First-degree polynomial equation solver
- Quadratic Equations (ax² + bx + c = 0) - Second-degree polynomial equation solver with discriminant analysis
- Cubic Equations (ax³ + bx² + cx + d = 0) - Third-degree polynomial equation solver using Cardano's formula
- Quartic Equations (ax⁴ + bx³ + cx² + dx + e = 0) - Fourth-degree polynomial equation solver using Durand-Kerner method
- Quintic Equations (ax⁵ + bx⁴ + cx³ + dx² + ex + f = 0) - Fifth-degree polynomial equation solver using numerical methods
- Systems of Linear Equations - Solve 2×2 linear systems using Cramer's rule
- Matrix Calculator - Operations on 2×2 and 3×3 matrices (addition, multiplication, determinant, inverse)
- Graph Visualization - Plot and visualize linear, quadratic, and cubic equations with interactive controls
- Six Themes - Choose from Cyberpunk, Matrix, Sunset, Ocean, Galaxy, and Neon color schemes
- Multi-Language Support - Available in English, French, Spanish, German, and Italian
- Interactive Background - Dynamic particle system that responds to mouse interactions
- Keyboard Input - Enter equation coefficients directly via keyboard for faster input
- Step-by-Step Solutions - View detailed solution steps for educational purposes
- Calculation History - Access your last 50 calculations for reference
- Responsive Design - Optimized for desktop, tablet, and mobile devices
- Keyboard Navigation - Full keyboard support with intuitive shortcuts
- A modern web browser (Chrome, Firefox, Safari, or Edge)
- No additional software or dependencies required
- Download or clone the repository
- Open the
index.htmlfile in your web browser
That's all! The application runs entirely client-side with no server or build process required.
The standard calculator supports all fundamental arithmetic operations. You can interact using either the on-screen buttons or your keyboard.
- Select the appropriate equation type from the home screen
- Enter the coefficients in the designated input fields
- Click the "Solve" button to view the solution
- Review the step-by-step solution process
Linear Equation:
For the equation 2x + 5 = 0, enter:
- a = 2
- b = 5
Quadratic Equation:
For the equation x² - 5x + 6 = 0, enter:
- a = 1
- b = -5
- c = 6
Matrix Operations:
For matrix addition of two 2×2 matrices:
A = [1 2] B = [5 6]
[3 4] [7 8]
Select "Addition" operation and enter the values in the grid inputs.
- Numbers & Operators - Direct keyboard input
- Enter or = - Calculate result
- Escape - Clear all inputs
- Backspace - Delete last digit
- Tab - Navigate between input fields
- HTML5 - Semantic markup and structure
- CSS3 - Advanced styling with Grid, Flexbox, and animations
- Vanilla JavaScript - Pure JavaScript with no framework dependencies
- Particles.js - Interactive particle background system
- Google Fonts - Orbitron and Roboto typefaces
- SVG Graphics - Scalable vector icons and flag images
EquaSolver/
├── index.html # Main application file
├── package.json # NPM dependencies and test scripts
├── css/
│ └── style.css # Styles, themes, and animations
├── js/
│ ├── script.js # Core application logic and solvers
│ ├── translations.js # Multi-language translation data
│ └── flags.js # Base64-encoded country flags
├── tests/ # Jest test suite
│ ├── calculator.test.js # Standard calculator tests
│ ├── linear.test.js # Linear equations tests
│ ├── quadratic.test.js # Quadratic equations tests
│ ├── cubic.test.js # Cubic equations tests
│ ├── quartic.test.js # Quartic equations tests
│ ├── quintic.test.js # Quintic equations tests
│ ├── systems.test.js # Systems of equations tests
│ ├── matrix.test.js # Matrix calculator tests
│ └── README.md # Testing documentation
├── README.md # Project documentation
└── LICENSE # MIT License
This project includes a comprehensive test suite using Jest.
# Install dependencies
npm install
# Run all tests
npm test
# Run tests in watch mode
npm run test:watch
# Generate coverage report
npm run test:coverageThe test suite includes:
- ✅ 63+ test cases covering all mathematical operations
- ✅ Linear equation solving
- ✅ Quadratic equation solving (all discriminant cases)
- ✅ Cubic equation solving
- ✅ Quartic equation solving (Durand-Kerner numerical method)
- ✅ Quintic equation solving (numerical root finding)
- ✅ System of equations (Cramer's rule)
- ✅ Matrix operations (addition, multiplication, determinant, inverse)
- ✅ Edge cases and error handling
See tests/README.md for detailed testing documentation.
Utilizes the discriminant method:
- Δ = b² - 4ac
- Δ > 0: Two distinct real solutions
- Δ = 0: One repeated real solution
- Δ < 0: No real solutions (complex conjugates exist)
Implements Cardano's formula:
- Depressed cubic transformation
- Discriminant calculation
- Solution classification based on discriminant value
Uses the Durand-Kerner numerical method:
- Initialize approximate roots using unit circle distribution
- Iteratively refine roots using polynomial evaluation
- Filter for real solutions with tolerance threshold
- Converges to accurate roots within specified tolerance
Applies Cramer's rule with determinants:
- Calculate the main determinant
- Calculate determinants for each variable
- Determine solution type (unique, infinite, or no solution)
Supports 2×2 and 3×3 matrices:
- Addition: Element-wise sum of corresponding entries
- Multiplication: Standard matrix multiplication using dot products
- Determinant: Computed using cofactor expansion for 2×2 and 3×3 matrices
- Inverse: Calculated using adjugate matrix method (returns null for singular matrices)
| Browser | Minimum Version | Status |
|---|---|---|
| Google Chrome | Latest | ✅ Fully Supported |
| Mozilla Firefox | Latest | ✅ Fully Supported |
| Safari | Latest | ✅ Fully Supported |
| Microsoft Edge | Latest | ✅ Fully Supported |
| Opera | Latest | ✅ Fully Supported |
Contributions are welcome and appreciated. To contribute:
- Fork the repository
- Create a feature branch (
git checkout -b feature/YourFeature) - Commit your changes (
git commit -m 'Add YourFeature') - Push to the branch (
git push origin feature/YourFeature) - Open a Pull Request
- Maintain code quality and consistency
- Test thoroughly across different browsers
- Update documentation as needed
- Follow existing code style and conventions
This project is licensed under the MIT License. See the LICENSE file for complete details.
You are free to use, modify, and distribute this software for personal or commercial purposes with proper attribution.
- Particles.js - For the exceptional particle animation library
- Google Fonts - For providing high-quality web typography
- Mathematical Community - For classical algorithms and methods that inspired this implementation
If you find this project helpful, please consider:
- ⭐ Starring the repository
- 🐛 Reporting bugs via the issue tracker
- 💡 Suggesting new features or improvements
- 📢 Sharing with others who might benefit
Note: The following items represent potential future enhancements and ideas. No timeline or guarantee is provided for implementation. Contributions are welcome for any of these features.
- Add support for higher-degree polynomial equations (4th, 5th degree)
- Implement matrix calculator (addition, multiplication, determinants, inverse)
- Add graphing capabilities to visualize equations
- Export solutions to PDF format
- Add more theme options (custom theme builder)
- Implement equation input via LaTeX syntax
- Add scientific calculator mode with advanced functions (sin, cos, log, etc.)
- Support for parametric and polar equations
- Add step-by-step explanation animations
- Implement dark/light mode toggle independent of themes
- Write comprehensive API documentation
- Create video tutorials for complex features
- Add unit tests for equation solvers
- Implement end-to-end testing
- Add accessibility (WCAG 2.1) compliance testing
- Create contribution guidelines document
- Optimize particle rendering for mobile devices
- Implement service worker for offline functionality
- Add lazy loading for improved initial load time
- Optimize CSS and JavaScript bundle sizes
- Add progressive web app (PWA) support
- Add more language translations (Japanese, Chinese, Russian, Arabic)
- Implement right-to-left (RTL) support for Arabic
- Add localized number formatting
- Create translation contribution workflow
Built with precision and attention to detail
© 2025 EquaSolver | Report Issue | Request Feature