bcal (Byte CALculator) is a REPL CLI utility for storage expression evaluation, unit conversion and address calculation. If you can't calculate the hex address offset for (512 - 16) MiB, or the value when the 43rd bit of a 64-bit address is set mentally, bcal is for you.
It has a bc mode for general-purpose numerical calculations.