Since you'll presumably want to be doing something with the result of a calculation, even if it's just displaying it so you know what it is, I'd say the go-to method would be to set a variable to a calculation (key action in yellow):
Example Macro.kmmacros (2.7 KB)
Further reading: https://wiki.keyboardmaestro.com/manual/Calculations