What this calculator does
Add, subtract, multiply, or divide monetary amounts using exact cent arithmetic where applicable.
How it works
The calculator evaluates addition and subtraction operate on integer cents; multiplication and division are rounded to the nearest cent. Inputs are checked before calculation, and invalid values such as zero denominators or out-of-range selections produce a clear error instead of a misleading result.
Input query strings and outputs
Use an input name in this page’s URL as ?name=value, and join additional inputs with &. Portable shared links may instead use the compact ?ac= state parameter.
Input query strings
4-
?operation=OperationChoice · Required · Default: add · Accepted values: add, subtract, multiply, divide
-
?amountA=First amountMoney · Required · Default: 125.75
-
?amountB=Second amountMoney · Required · Default: 48.35
-
?factor=Factor or divisorNumber · Required · Default: 3
Outputs
4-
resultMoney resultCurrency · Primary output
-
unroundedResultUnrounded resultNumber
-
roundingDifferenceCent-rounding differenceCurrency
-
equationEquationText
Inputs and results
The inputs are Operation, First amount, Second amount, Factor or divisor. Results include Money result, Unrounded result, Cent-rounding difference, Equation.