Fraction API
Exact fraction maths with arbitrary-precision integers — no floating-point rounding. The simplify endpoint reduces any fraction to its lowest terms and returns the decimal value, the mixed-number form (10/4 → 2 1/2) and whether it is a whole number. The calc endpoint adds, subtracts, multiplies or divides two values — given as fractions (1/2), whole numbers, mixed numbers (1 1/2) or decimals (0.5) — and returns the simplified result. The fromdecimal endpoint turns a decimal into a fraction: exactly for terminating decimals, and precisely for repeating decimals written with parentheses, so 0.(3) becomes 1/3 and 0.1(6) becomes 1/6. Because every step uses big integers, results are always exact and very large numerators or denominators are returned as strings rather than losing precision. Ideal for education and maths tools, recipes and unit scaling, engineering and woodworking measurements, finance, and anywhere fractions must stay exact. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 4 endpoints. This is fraction maths; for general expressions use a math-engine API and for prime factorization use a number-theory API.
api.oanor.com/fraction-api