About
Shorter terms.
A checkable error.
Ratiofit turns a desired positive decimal proportion into a nearby whole-number ratio under separate limits on each term.
A long decimal can be awkward to label on a diagram or compare with a short pair of integers. This calculator keeps that small task focused: you choose the target and two caps, it searches the legal pairs, and the exact signed and absolute errors stay visible beside the selected reduced ratio.
A precise question rather than a hidden shortcut
The chosen objective is absolute ratio error. Equal errors favour the lower rational value, then the smaller denominator and numerator. Positive terms only, independent caps and the finite entered decimal are all explicit. The guide explains why the per-denominator candidate search covers the complete finite problem.
This is distinct from unit conversion, image fitting, distributing a fixed quantity or selecting gears. A compact proportion may be useful in a layout or model sketch, but the calculator does not know dimensions, materials, loads, fabrication tolerances or the purpose of your project. A small ratio error is not a physical-fit guarantee.
Local by design
No login, payment, upload or cloud save is needed. Once loaded, the calculation runs in your browser. Editing inputs clears the old result; Calculate ratio performs the next bounded search. Optional copy and downloads use only the current valid result. The implemented release includes no analytics, advertising or consent-platform loader.
Accuracy with visible boundaries
The script uses exact scaled-integer parsing and comparisons. Display decimals are rounded, while exact fractions remain available. Independent exhaustive small-bound checks, large-bound analytical cases and actual handler tests verify the source; actual browser and public-host checks are separate release evidence.
Read the worked examples to see tiny errors, ties and boundary results. Use contact for a compact reproducible issue. There is no required conversation or promised response time.