# The Uncertainty Calculator

Thu 25 September 2014An uncertain calculator - that doesn’t sound very useful does it?

If my hours of lab reports have drilled anything into me, it’s that you can’t trust a number until you know it’s uncertainty. Who cares if adding chemical A to a culture caused it to produce 5% more of chemical B, if that 5% is actually 5% ± 10%?

Of course, actually working out the errors in the first place is a pig of a job, and many people just don’t bother. The reason they are so annoying is that for every *operation* you do to a number, you need to work out a completely separate equation for the uncertainty, so for:

If we call the uncertainty in each number
E_{A}
,
E_{B}
and
E_{C}
, then to work out the uncertainty in
C
, we need to do:

_{C}= ( (E

_{A}÷ A)

^{2}+ (E

_{B}÷ B)

^{2})

^{0.5}

Looks yuck, doesn’t it? It’s not exactly *hard*, but it is *annoying*. Add to that the fact that the above equation is only an *approximation* of the true equation, and so falls down in a few cases (eg. when an uncertainty is approaches the size for the value).

**“There must be a better way!”** I thought to myself in anguish.

“Wait a minute, I can automate this” I realized, and so with great gusto I dived into creating **THE UNCERTAINTY CALCULATOR**!

This calculator allows numbers to be input along with their uncertainties, and handles propagation and conversions for you. It’s great unveiling was met with jubilant (metaphorical) cheers from students and faculty staff alike.

I had a lot of fun making the parser for this calculator, and making sure order of operations is followed (surprisingly difficult!), and lots of other nice-to-have’s (think that `ANS`

button, the “real” mode, and the memory store).

Of course, all this is free and open source, and you can improve it or leave issues at it’s github repo.