If you need a calculator, with ability to do symbolic maths, bigints, plotting and support for units, there is no need to build on from scratch… Maxima is free, long-established, and can be run via Jupyter (see for a fixed-up dockererised version, try out on BinderHub note may take some time to start for first time while binderhub rebuilds the container).

It supports units using the bult-in ezunits module:

load ("ezunits")$
load ("physical_constants")$

For example:

1`kg + 1`g;

is by default printed in its original symbolic form:


But can be converted to grams using:

% `` g;


Or to kilograms:

% `` kg, numer;

There are built-in physics constsants too:


The numerical value can be seen with:

constvalue(%c) ;

Or in different units:

constvalue(%c) `` cm / s , numer;
\[2.99792458 \times 10^{+10}\;\frac{\mathrm{cm}}{\mathrm{s}}\]

All the formating shown here is built-in but sometimes it needs a bit of fixing up:

100000` Pa `` psi, numer;

gives the greek letter not, pounds-square-inch:


You can try out all this and all the other Maxima features on BinderHub .