What this calculator does
Tape measures, spanners and recipes work in halves, quarters, eighths and sixteenths rather than decimals. Converting a decimal to the nearest such fraction is a constant small task in workshops and kitchens.
Finer denominators give closer results. Rounding 3.34 to the nearest half gives 3 1/2 with an error of 0.16, while the nearest sixteenth gives 3 5/16 with an error of only 0.0275.
The formula
The decimal is multiplied by the denominator and rounded to a whole number. That numerator over the denominator is then simplified by dividing both by their greatest common divisor.
| Term | Meaning |
|---|---|
| Denominator | The fraction size to round to, such as 16 for sixteenths. |
| Simplification | Dividing numerator and denominator by their common factor. |
| Rounding error | How far the rounded fraction sits from the original decimal. |
The inputs explained
| Field | What to enter |
|---|---|
| Decimal value | The decimal value to round. |
| Round to nearest 1/… | The denominator to round to. Use 16 for sixteenths, 8 for eighths and so on. |
When to use it
Reading a tape measure
Imperial measurements come in halves down to sixteenths or thirty-seconds.
Scaling a recipe
Cup and spoon measures are fractional rather than decimal.
Choosing a tool size
Spanner and drill sizes are fractional in imperial sets.
Worked examples
Every figure in the tables below is produced by this page’s own calculator at build time, so the numbers and the tool always agree. Select any row to load that scenario.
How much precision does each denominator give?
The same decimal at four fraction sizes.
| Round to nearest | Nearest fraction | Rounding error |
|---|---|---|
| 1/2 | 3 1/2 | 0.160000 |
| 1/4 | 3 1/4 | 0.090000 |
| 1/8 | 3 3/8 | 0.035000 |
| 1/16 | 3 5/16 | 0.027500 |
Questions
Why does the fraction simplify automatically?
Because 8/16 and 1/2 are the same quantity, and the simplified form is what anyone would actually write or say. Dividing both parts by their greatest common divisor produces it.
What is the worst possible error?
Half the fraction size. Rounding to the nearest sixteenth can never be off by more than one thirty-second, which is why finer denominators give tighter results.
Can I use a denominator that is not a power of two?
Yes, any whole number works. Thirds and twelfths are useful for recipes and for time, even though imperial measurement conventions favour powers of two.
Why do imperial measurements use powers of two?
Because halving is the easiest division to do physically, on a ruler or by folding. Repeatedly halving an inch gives halves, quarters, eighths and sixteenths without ever needing to divide by three.
For error against a true value, see the percent error calculator. For unit conversion generally, see the length conversion calculator.