Equation Engine


Equation Engine

Every time I needed an LED in a circuit, I’d go through roughly the same process: set a target current, get the LED’s forward voltage, calculate the theoretical resistor, then pick a real resistor and check the resulting current.

Usually in another spreadsheet.

None of this is difficult, but I’ve repeated it enough times that I wanted a better way to handle it. I like solving persistent problems in a permanent, efficient way, and Equation Engine is something I’ve wanted for nearly a decade.

Same Equation, Different Unknown

The most useful feature for me is being able to solve for any variable.

For the LED example, I use the ordinary Ohm’s Law calculator. With a 5 V supply and a 2 V LED forward voltage, I can enter 5-2 directly into the voltage field. Enter 12m for a target current of 12 mA, select resistance as the unknown, and the result is 250 Ω.

The calculator also shows the nearest E96 resistor value. Clicking the suggested 249 Ω fills that value back into the calculator. Select current as the unknown, and I get 12.048 mA.

No rearranging the equation, and no setting up another spreadsheet to work backward from the resistor I actually have.

Ohm’s Law is a trivial example, but the same approach works for all basic algebraic manipulations. I can enter an equation once and solve for whichever variable I need.

The backend accepts equations in LaTeX, so adding a new one is as easy as writing out the formula. Being able to do that and immediately have a useful calculator still feels like magic to me. The arbitrary calculator lets me try an equation without saving a calculator.

And using “Share Link” lets me save a link in my notes or documentation that I can jump right back into later if I need to change the values.

Building It

I developed most of Equation Engine with AI as a learning exercise, but the calculations themselves are deliberately deterministic. Equations are stored as LaTeX, and SymPy handles the algebra to solve for the selected unknown. There’s no AI generating the answers. Storing the equation itself lets me use the same formula to solve for different variables without writing a separate calculator for each one.

Having wanted this for so long, I already had a pretty good idea of how I wanted it to work. The first version got about 80% of the way there, and I’ve been refining it over time as I use it.

It’s a Flask application with a database, running in Docker on a VPS behind Cloudflare.

Using It

Mostly, I use it myself. Honestly, I’m happy if it’s just me, but other people may find it useful.

The preloaded calculators are available without an account. You can also use the arbitrary calculator to enter your own equation and make a link to save or share.

If it needs to scale, that’ll require some work. For now, it’s running, and I’m using it instead of rebuilding those spreadsheets.