Convert a decimal to its simplest fraction (with a whole-number part) or a fraction back to a decimal.
Numbers • fractions
Encoding and decoding share the page, so any result can be pasted straight back to confirm it round-trips to the text you started with — the quickest check that nothing was mangled.
Results are recalculated on every keystroke, with no submit step and no page reload, so a value can be adjusted until the answer looks right rather than guessed once.
Everything runs in your browser — no account, no uploads, nothing leaves your device.
Converting a decimal to a fraction expresses it as a ratio in lowest terms — 0.375 becomes 3/8. This is constant in cooking, woodworking, construction, math homework and finance, where a fraction is often clearer than a long decimal.
This tool finds the simplest fraction for any decimal (with a whole-number part for values over 1) and converts fractions like 1 1/2 back to decimals. Repeating decimals are approximated very closely. Instant and private.
Terminating decimals convert to fractions mechanically: the digits become the numerator and the place value becomes the denominator, after which you reduce. Repeating decimals need an algebraic trick — multiply by a power of ten that shifts one full repeat, subtract the original, and the repeating tail cancels. That method proves the surprising result that 0.999… equals exactly 1, which is not an approximation but an identity. Irrational numbers such as π and √2 have no fractional form at all, so any fraction given for them is an approximation, however good.
Terminating: 0.abc = abc ÷ 10ⁿ, then divide both by their GCDRepeating: let x = the decimal, multiply by 10^(repeat length), subtract x, solveReduce using the greatest common divisorwhere:
Assumptions: Exact for terminating and repeating decimals, which together are precisely the rational numbers. A decimal that neither terminates nor repeats is irrational and has no exact fraction.
Convert a terminating decimal, then a repeating one using the subtraction method.
Result0.375 = 3/8 and 0.4545… = 5/11
The same subtraction method applied to 0.999… gives 10x − x = 9, so 9x = 9 and x = 1 exactly. It is not "nearly" one — the two notations name the same number, which is one of the few genuinely counter-intuitive results in elementary arithmetic.
A decimal terminates only when its denominator is built from twos and fives, which is why 0.375 resolves cleanly to 3/8 while a third does not resolve at all. Everything else repeats forever, and a converter has to decide how much of that repetition to honour. Values that repeat are matched to the simplest fraction within a tolerance, so the result is an excellent approximation rather than an identity — a distinction that matters as soon as the fraction is multiplied by something large.
Computers introduce a second layer of approximation before the conversion even begins. Binary floating point cannot represent 0.1 exactly, for the same reason decimal cannot represent a third, which is why adding a tenth to two tenths does not produce exactly three tenths in most programming languages. A decimal typed into any tool is therefore already the nearest representable value, and asking for its exact fraction can surface that discrepancy rather than hide it.
In workshop and construction use the question is usually narrower: not the simplest fraction, but the nearest one on a real scale. Tape measures are graduated in sixteenths, machinists work in thousandths, and drill and wrench sets come in fixed increments — so 0.375 is more useful read as six sixteenths than as three eighths when the marks on the tape are what you are aiming at. Rounding to the denominator you can actually measure is often more accurate in practice than carrying an exact fraction you cannot.