Round to decimals, significant figures or the nearest multiple, with every rounding mode.
Rounding replaces a number with a nearby value that is simpler or fits a required precision. The five modes differ only in the tie-breaking rule: half-up (the school rule) always rounds 0.5 away from zero; half-even (IEEE 754) rounds 0.5 to the nearest even number, eliminating statistical bias; ceiling and floor unconditionally round up or down; truncate drops the fractional part without regard to sign.
Decimal rounding
x_rounded = round(x × 10^n, mode) / 10^n
Significant figures
places = sigFigs − floor(log₁₀|x|) − 1
Nearest multiple
x_rounded = round(x / multiple) × multiple
Half-up is the everyday 'round 0.5 up' rule. Over a large dataset, consistently rounding 0.5 upward introduces a slight positive bias. Half-even (banker's rounding) avoids this by rounding 0.5 to whichever neighbour is even: 2.5 → 2, 3.5 → 4. It is the IEEE 754 default and is used in financial and scientific computing.
Significant figures are the meaningful digits of a measurement, starting from the first non-zero digit. The number 0.00340 has 3 significant figures (3, 4, 0). Trailing zeros after a decimal point are significant.
Rounding to a nearest multiple is useful for prices (nearest $0.05), time intervals (nearest 15 minutes), and measurements on scaled instruments. For example, 73 rounded to the nearest 10 is 70, and 3.14 rounded to the nearest 0.25 is 3.25.