Significant Figures (count + round)
Count sig figs in a number; round to a target N.
Example
You enter
- Number (decimal or scientific) 0.00347
- Round to N sig figs (optional) 2
You get
- Significant figures in input 3
- Rounded to target sig figs 0.0035
Details, formula, and sources
Leading zeros not significant; trailing zeros after a decimal ARE.
Sig-fig count: non-zero digits are always significant; zeros between non-zeros are significant; leading zeros are not; trailing zeros after a decimal point ARE significant. Trailing zeros in a bare integer are ambiguous and NOT counted here (use scientific notation for explicit precision). Rounding to N sig figs: scale by 10^(N - ceil(log10(|x|))), round, scale back.
Significant-figure conventions per NIST SP 811 §7 (Guide for the Use of the International System of Units).
Free at nist.gov/pml/special-publication-811.
Estimate only. Readability formulas and similar metrics are derived from a representative population and have known edge-case noise. The classroom teacher governs final text selection, grade placement, and assessment decisions.
Field names used by the API: value, target_sig_figs, input_sig_figs, rounded_value
- Bare-integer trailing zeros not counted; use scientific notation (1.500e3) or a trailing decimal (1500.) to mark them as significantconvention; the rule is ambiguous in plain decimal
- Rounding mode round half to even (banker's rounding) via IEEE-754JS Math.round behavior; matches NIST guidance