# Units in SpeedCrunch

There are a lot of units to remember in physics. I often make errors because I forget to multiply by something, or I’m mixing up meters and kilometers by mistake. Wouldn’t it be convenient to not have to worry about that and make the computer to it instead? I recently found out that SpeedCrunch, which is a nice scientific calculator, supports units really well.

Say we have a velocity and time, and we want to find the displacement s where $$s=v*t$$ We’ve defined time in seconds and velocity in meters/second and the output is in meters!

This is a simple example, but where this really shines is when we have more advanced equations.

The Newtonian gravitational constant G is defined as $$G=6.67408\cdot10^{-11}\ \frac{Nm^2}{kg^2}$$

We can input this into SpeedCrunch: Gravity at the equator can be calculated with the gravitational constant using this formula:

$$g_r = G\frac{M}{r^2}$$

Where r is the equatorial radius and M is the mass of the Earth. This is not the expected result. Joule/kilogram doesn’t make any sense at all. You probably saw the mistake already, but the issue is that we forgot to square r. Let’s try it again: Much better! Now it is showing in the correct unit of meters/second². This error might’ve gone unnoticed if the answer wasn’t so obvious.

Kilometer is typed as kilo meter because kilo and meter are different keywords, kilo just meaning “multiply by 1000”. Same goes for milli, centi etc. This way we get all measurements in meters.

You can also really easily convert kilometers per hour to meters per second just by typing it out like this: In general, everything is converted to the SI base unit. 1 hour is defined as 60² = 3600 seconds. 1 gram is 0.001 kilograms.

You can’t add incompatible units together, in this example we’re trying to add meters/second to a meter value. It doesn’t let us do this:  This works, because we’re adding everything in meters.

I like doing this, because it makes writing equations “type safe” like a programming language would. It doesn’t prevent you from typing the wrong numbers, but atleast you won’t be making the mistake shown above.