CCalclabhub

Arithmetic

Rounding to a number of significant figures

Shift the decimal point so the last kept digit becomes the final digit, round, then shift back.

The Formula

rounded = round(x, sigFigs - 1 - floor(log10(|x|)))

Shift the decimal point so the last kept digit becomes the final digit, round, then shift back.

SymbolMeaning
xInput
nSignificant figures
log10(|x|)Order of magnitude
roundedResult

What Each Symbol Means

xany unit

Input

The number being rounded.

nunitless

Significant figures

How many digits to keep.

log10(|x|)unitless

Order of magnitude

The power of ten the number starts at.

roundedsame unit

Result

The number carrying exactly n significant figures.

See It Worked With Real Numbers

A formula on its own does not tell you which number goes where. The how to count significant figures page applies this equation to a concrete case, shows every intermediate step, and names the mistakes that produce a wrong answer even when the algebra is right.

Where This Formula Appears

This equation is the working core of How To Count Significant Figures, filed under Math. Every number the guide produces comes from substituting into this one line.