Skip to content

Repository files navigation

OmniSolver

🧮 OmniSolver

The everything calculator. A complete dark-mode mathematics workbench that runs entirely in the browser.

Sixteen solvers · scientific to eigenvalues · symbolic calculus to amortisation · installable as an app · no build-time backend, no accounts, no tracking.

▶️ Open it · 🐛 Report a bug


📑 Contents


✨ Features

🧮 Sixteen solvers, one workspace. Scientific and programmer calculators, graphing, an equation solver with worked steps, symbolic algebra, calculus, linear algebra, statistics, probability, number theory, unit conversion, geometry, finance and a reference sheet — all under one command palette. See the full list.

⌨️ Type maths, not button sequences. Every input takes a whole expression. Pretty notation is understood as you write it: √81, 15% of 240, π, , , nCr(6,2). Units work inline too — (3 ft + 2 in) to cm gives 96.52 cm, and adding metres to seconds is rejected rather than guessed at.

📐 Answers you can check. Symbolic results are sampled numerically before they are shown, so an extraneous root from squaring both sides is discarded instead of displayed. Where no closed form exists you get a high-accuracy numeric answer labelled with its method and evaluation count.

📊 A real plotting engine. Cartesian, polar and parametric curves on canvas: pan, zoom about the cursor, trace, automatic roots, extrema and intersections, derivative overlays and shaded integrals. Poles are detected, so a curve breaks at an asymptote instead of drawing a vertical line through it.

Fast by construction. The shell paints before React runs, each solver is its own chunk, and hovering a sidebar item starts fetching that chunk before the click lands. math.js and nerdamer are each assembled from a curated set of factories rather than their all bundle, and npm run build fails if any chunk exceeds its budget — see scripts/check-budget.mjs.

📴 Works offline. A service worker precaches the whole app, including solvers you have never opened, so it starts instantly and keeps working with no network. Installable to a home screen or desktop as a PWA.

🎨 Yours to tune. Dark, light or follow-the-system; five accent ramps; two densities; four number notations; significant digits from 2 to 16; radians / degrees / gradians. All remembered in localStorage, none of it leaving the browser. Every one of the thirty theme × accent combinations is measured against WCAG AA — see Accessibility.

🔒 No network calls at all. Fonts are self-hosted. There is no analytics, no CDN, no backend. connect-src 'self' is enforced and nothing ever contacts it.


🧭 The sixteen solvers

Group Solver What it does
Calculators Scientific Expression calculator with history, memory, user variables, angle modes and 60+ functions. Units work inline.
Programmer BIN/OCT/DEC/HEX side by side, clickable bit grid, AND/OR/XOR/NAND/NOR, shifts and rotations, 8/16/32/64-bit words, signed and unsigned.
Complex numbers Arithmetic, polar/exponential/trigonometric forms, nth roots, and a live Argand diagram.
Solvers Equation solver Symbolic solutions verified numerically, quadratic worked steps, polynomial roots (Durand–Kerner, real + complex), linear systems with full Gauss–Jordan traces, and bisection / Newton / secant iteration tables.
Algebra & CAS Simplify, expand, factor, partial fractions, substitution, polynomial division, and an identity checker.
Calculus Symbolic derivatives to 4th order with tangent lines, indefinite and definite integrals (adaptive Simpson + tanh–sinh, infinite bounds supported), limits with a numeric approach table, Taylor series against the true curve, Σ/∏, and RK4 solutions of y' = f(x, y) over a slope field.
Matrix & linear algebra Determinant, inverse, rank, trace, powers, RREF with every row operation listed, LU / QR / Cholesky, eigenvalues from both the characteristic polynomial and a numeric solver, Ax = b with unique / infinite / inconsistent detection and a null-space basis, plus vector tools.
Analysis Graphing Multiple Cartesian, polar and parametric curves; pan, zoom, trace; automatic roots, extrema and intersections; derivative overlay; shaded definite integrals; value tables.
Statistics Full descriptive summary, histogram with fitted normal, box plot with outliers, five regression families with R² and residual plots, and z / t / χ² tests.
Probability 14 distributions with PDF/PMF, CDF, quantiles and shaded tails; normal/z-score workbench; combinatorics with exact big-integer factorials; probability rules and Bayes.
Number theory Arbitrary-precision integer explorer (Pollard's rho factorisation, divisors, φ, σ), Euclid with Bézout coefficients, modular exponentiation and inverses, CRT, base 2–36 conversion including fractions, primes, Fibonacci, Collatz and continued fractions.
Applied Unit converter 14 categories, 120+ units, a live full-category conversion table, and a dimension-checked expression evaluator.
Geometry Triangle solver (SSS/SAS/ASA/AAS and the ambiguous SSA case) with a scaled diagram, 2D/3D shape formulas, and coordinate geometry including the shoelace formula.
Finance Loans and amortisation with extra payments, compound growth and savings plans, a five-variable TVM solver, NPV/IRR/payback with an NPV profile, break-even and depreciation.
Date & time Date differences (calendar and business days), date arithmetic, age and milestones, Unix timestamp conversion.
Reference Constants & formulas Searchable CODATA physical constants, mathematical constants, a formula sheet, and Greek/notation tables.

⌨️ Keyboard and gestures

Action Mouse / touch Keyboard
Jump to any solver Click the sidebar Ctrl/ + K
Move through palette results Hover , then Enter
Move between tabs in a solver Click a tab Home End
Evaluate the focused input Enter
Recall the previous expression in an empty input
Close a dialog Click outside Esc
Zoom a graph about the cursor Scroll or pinch
Zoom one axis only Shift / Alt + scroll
Pan a graph Drag
Reset the view Double-click

ans holds the last scientific-calculator result, and x = 3 defines a variable you can reuse anywhere in that module.


💻 Running locally

npm install
npm run dev

Then open the printed localhost URL. To produce a production build:

npm run build

npm run preview serves the built output.

The dev server is fine for everything except the service worker, which only registers in production builds — a cached worker would serve stale modules over Vite's HMR. Use npm run build && npm run preview when you need to test offline behaviour.


🧪 Tests

npm test

444 unit tests cover the maths libraries — 91% line coverage — across numerical analysis, statistics and distributions, linear algebra, number theory, finance, geometry, units, the expression engine and the symbolic layer.

Two suites earn their keep beyond ordinary coverage:

  • The CAS tests are differential. Every symbolic rewrite is sampled numerically at ~30 points and must agree with its input, which is how the incorrect partfrac((x+1)^3) result was caught.
  • mathsurface.test.ts pins the curated math.js build. Every keypad key, every symbol the normaliser rewrites, every operator, constant, unit and matrix call the app can reach is asserted there. Trim one factory too many and this fails instead of a user's expression.
npm run typecheck && npm run lint

🗂️ Project layout

src/
  lib/          math engine, CAS wrappers, numerics, linear algebra,
                statistics, number theory, units, finance, geometry
  components/   design-system primitives, KaTeX renderer, canvas plotter
  modules/      one file per solver, lazily loaded
  styles/       design tokens, base layout, UI kit
  types/        ambient declarations for nerdamer and mathjs factories
scripts/        asset generation and the postbuild step
public/         icons, manifest, social card

public/favicon.svg is the canonical brand mark — use it anywhere the logo is needed, including here. The other icons are rasterisations of it; npm run gen:assets rebuilds the two derived assets (the maskable icon and the social card) from those.

Each solver is one file in src/modules/, registered in src/modules/registry.ts. That registry is the single source of truth for the sidebar, the command palette, the lazy import and the hover prefetch — add an entry and the solver appears everywhere at once.

scripts/postbuild.mjs keeps its own copy of the module list for the landing pages, because it runs in Node against dist/ and cannot import the TypeScript registry. If you add a solver, add it in both places.


🎯 Accuracy

  • Symbolic answers are checked numerically before display, so extraneous roots are discarded rather than shown.
  • Where no closed form exists, a high-accuracy numeric result is given and labelled with its method and evaluation count.
  • Number-theory arithmetic uses BigInt and is exact at any size.
  • Definite integrals target ~1e-11 relative accuracy; infinite bounds use a double-exponential substitution.
  • The programmer calculator's division, remainder and arithmetic shift follow the signed/unsigned toggle, so -8 ÷ 2 is -4 in a signed word rather than the bit pattern read as 124.

♿ Accessibility

  • Tabs are a real ARIA tablist: each tab owns its panel through aria-controls, the panel carries role="tabpanel" and aria-labelledby, and a roving tabindex means Tab enters the strip once rather than stepping through every tab. Home End move within it.
  • The command palette is a combobox with an aria-activedescendant listbox, so the highlighted result is announced as you arrow through it.
  • Dialogs use role="dialog" with aria-modal, trap Tab, lock background scrolling by reference count so overlapping dialogs cannot strand the page, and return focus to whatever opened them.
  • Every field label is tied to its control by a generated id, so no input is announced unlabelled.
  • Icon-only controls carry an explicit accessible name; icons themselves are aria-hidden.
  • Focus is visible everywhere, including inside the horizontally-scrolling tab strip, where the ring is drawn inside the control so it cannot be clipped.
  • Plots expose a text description of their series and range through aria-label.
  • Ink colours are documented with their contrast ratio in src/styles/tokens.css, measured against a card rather than the bare panel — a card carries a --tint wash, so it is the least contrasting surface text actually lands on. Every step that carries real text clears WCAG AA in both themes.
  • Series colours come in two sets. PLOT_COLORS is for the canvas and SVG paint; PLOT_INK is the same eight hues re-tuned per theme for when the colour carries text, such as the graphing value table. A hue bright enough to glow on the canvas measures under 2:1 as type on a white panel.
  • Text on a filled accent stays dark in both themes rather than flipping to white in the light one. The accent ramps are bright in either theme, and white on the lightest one measures 1.25:1; the dark ink clears 4.6:1 against every stop of all five ramps.
  • prefers-reduced-motion collapses every transition, including the theme cross-fade; prefers-color-scheme is honoured when the theme is set to System.

🔒 Security posture

  • Content Security Policy is delivered via <meta> (GitHub Pages cannot set headers): default-src 'self', object-src 'none', base-uri 'self', form-action 'none'. script-src allows 'unsafe-eval' because math.js compiles expressions with the Function constructor — that is inherent to a client-side expression evaluator.
  • KaTeX runs with trust: false, which disables \href, \url and \includegraphics, so a crafted expression cannot inject a link or a script through the TeX renderer.
  • Everything read back from localStorage is validated against the shape it is supposed to have, with size and range caps, so corrupted or hand-edited state falls back to defaults instead of crashing a module.
  • The service worker never caches an error response, so a 404 or 5xx during a redeploy cannot be served to you every time you go offline afterwards.
  • Error boundary per module: a crash in one solver never blanks the app.

🌐 Browser support

Chrome/Edge 111+, Firefox 113+, Safari 16.4+. The app needs color-mix() in oklab, CSS custom properties, Pointer Events and ES2022 — all baseline since early 2023. Offline support additionally needs a service worker, which Safari provides but which is unavailable in private browsing on some platforms; the app falls back to plain online use.


📜 Credits and licence

Built with React 19 + TypeScript + Vite, powered by math.js (numeric core), nerdamer (symbolic algebra), KaTeX (typesetting) and a purpose-built canvas plotting engine. Type is Inter and JetBrains Mono, both self-hosted.

MIT — see LICENSE.

About

Every calculator you'll ever need, running entirely in your browser. Scientific, graphing, algebra, calculus, matrices, stats, units, finance — 16 solvers, no accounts, no tracking, works offline.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages