DEV Community

mathsway-team
mathsway-team

Posted on

Why I Built a Free Calculus Solver That Runs Entirely in Your Browser

A few months ago, I noticed something frustrating about online math tools. Most of them ask you to create an account, hide the step-by-step solutions behind a paywall, or send everything you type to a server. For a student who just wants to check a derivative before an exam, that's a lot of friction.

So I built Mathsway: a free calculator for integrals, derivatives and limits, with no signup and no backend. Everything runs in the browser. Here's why I made that choice and what I learned along the way.

The idea: no server, no account

Mathsway is a static Next.js website. Every page is generated at build time and served from a CDN, and the math happens on the user's device. This has a few real benefits:

  • Privacy. Whatever you type never leaves your computer or phone.
  • Speed. There's no network delay, so results appear instantly.
  • Low cost. Static hosting is cheap, even when traffic spikes before exam season.
  • Reliability. There's no server to crash, scale or maintain.

The trade-off is that symbolic math is heavy work, and not every student has a fast laptop. A lot of my effort went into keeping the interface smooth on cheap phones, mainly by loading the math engine only when it's needed and running the computation away from the main thread.

What the tools do

I started with the three topics that students search for the most.

The derivative calculator applies rules like the product rule, the quotient rule and the chain rule, and shows each one as a separate step. This is where seeing the reasoning matters most, because the final answer alone doesn't teach you anything.

The integral calculator handles definite and indefinite integrals. Integration is much harder than differentiation, since many ordinary-looking functions have no simple antiderivative. For more advanced cases, there is also a multiple integral calculator for double and triple integrals, including coordinate changes.

The limit calculator covers limits at a point or at infinity, including indeterminate forms and L'Hôpital's rule. I also added an equation solver for linear equations, quadratics and systems.

Steps matter more than answers

The biggest lesson from this project is that nobody really wants only the answer. Anyone can get a result from a calculator. What students need is to understand why the result is what it is.

That's why I designed the engine to produce a list of steps from the very beginning, instead of a single final expression. Each step names the rule used, shows the new expression, and explains what happened. Adding this later would have been much harder.

Being honest when the math fails

Another lesson: a solver should never pretend. Some integrals simply have no answer in elementary functions, and some expressions are too complex to handle. Showing a clear message like "no elementary antiderivative found" builds much more trust than returning something wrong. Students check their homework with these tools, so accuracy matters more than seeming clever.

Simplification is the hidden cost

Getting a correct result is one thing. Getting a result that looks like what a teacher would write is another. A raw symbolic output might be technically right but full of things like multiplications by one and unnecessary parentheses. Cleaning that up took almost as much work as implementing the calculus rules themselves.

What's next

I'm working on more worked examples, better explanations for each rule, and support for more languages, because students search for these topics in French, Arabic and many other languages, and good resources are not always available.

Try it and tell me what breaks

If you're a student, a teacher, or a developer curious about how this works, you can try everything for free at mathsway.net. If you find an expression it can't solve, or a step that's confusing, please tell me in the comments. Real feedback is the fastest way to improve a tool like this.

And if you've built a computation-heavy tool as a static site, I'd love to hear how you handled performance.

Top comments (0)