Methodology

The math behind every answer, and how it is checked.

This page describes how the calculators on this site turn your inputs into answers: how numbers are read, how ratio and proportion math is kept exact, how results are rounded, and which statistical methods are used.

Reading Your Inputs

Inputs may be whole numbers, decimals, fractions such as 3/4, mixed numbers such as 1 1/2, and numbers with thousands separators such as 1,250. Each input is converted to an exact fraction before any math is done; 0.1 becomes 1/10, not a binary approximation.

To keep the page responsive, an input may be at most 40 characters and 30 digits long. Anything else is rejected with a message that says what to change, and shared links are read with the same strict rules.

Exact Ratio and Proportion Math

Ratio, proportion, scaling and variation tools work on fractions whose top and bottom are whole numbers of any size (JavaScript BigInt). Every fraction is reduced by its greatest common divisor after each step. Because nothing is rounded until the end, answers such as 2 : 3 = 5 : x → x = 15/2 are exact.

  • Proportion: a : b = c : d is solved by cross multiplication, for example d = b × c ÷ a.
  • Simplifying a ratio: divide every term by the greatest common divisor of all the terms.
  • Scale factor: k = new ÷ original, then every part is multiplied by k.
  • Direct variation: y = kx with k = y ÷ x. Inverse variation: y = k ÷ x with k = x × y.

Rounding Rules

Exact answers are shown as fractions or terminating decimals. When a decimal must be cut, it is rounded half away from zero to the number of places the tool shows, and the result is marked with ≈. Rounding is applied only to the displayed answer; intermediate steps keep the exact value.

Kitchen tools round amounts to common measuring fractions such as 1/4, 1/3 and 1/2 cup, and say so. Statistics results are shown to a fixed number of places (for example p-values to 4 places, or as p < 0.0001).

Statistical Methods

Methods used by the statistics calculators
TaskMethod
Confidence interval for one proportion Wilson score (default), Wilson with continuity correction, Agresti-Coull, Clopper-Pearson exact, Wald
One-proportion test z test using the null proportion in the standard error, with an exact binomial test for small samples
Two-proportion test z test with the pooled proportion, also shown with a continuity correction; Cohen’s h as effect size
Interval for a difference Newcombe hybrid score interval, with Wald shown for comparison
Sample size n = z² p(1 − p) ÷ E² with optional finite population correction; power-based n for two groups

Normal probabilities and quantiles are computed with double-precision numerical approximations, and the Clopper-Pearson interval uses the inverse regularized incomplete beta function. Each method is tested against reference values from Python statsmodels and SciPy before release.

Each tool also checks the assumptions it can test from the numbers, such as at least 10 expected successes and failures, and prints a warning in its steps when a check fails.

References