For those of you who play fullscreen / don't always have a calculator on hand / can't be bothered with opening one on pc or phone: there's the /=eval command which you can use for arithmetic. It's from Minetweaker iirc, but you can totally just use it as a quick calculator command.
Usage: Just use the command/=eval [expression] where 'expression' is, for example, 18*64 to get a result (probably with far too many decimals). I'm pretty sure it also supports some more advanced operators like mod() but I have no way to check that currently.