Updated calculator with proper math
Updated with documentation