Skip to content

Proportion Calculator ​

Solve the rule of three (cross-multiplication). Type three values, pick direct or inverse, and get the fourth. The values stay in the form after each answer, so you can change one number and press Enter to try the next.

This is the math proportion solver, not the rule-of-thirds photo composition grid.

API Endpoint ​

POST /api/v1/tools/files/proportion-calculator

Accepts a JSON body, not multipart form data, and answers with a number instead of a file to download.

Parameters ​

NameTypeDefaultDescription
anumber(required)First known value.
bnumber(required)The value that goes with a.
cnumber(required)Third known value. X is the value that goes with it.
modestringdirectdirect or inverse.
ModeReads asFormulaExample
directA is to B as C is to XX = B × C ÷ A3 apples cost 6, so 10 apples cost 20
inverseA × B = C × XX = A × B ÷ C4 workers take 6 days, so 8 workers take 3 days

Example Request ​

bash
curl -X POST http://localhost:1349/api/v1/tools/files/proportion-calculator \
  -H "Authorization: Bearer si_your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"a": 3, "b": 6, "c": 10, "mode": "direct"}'

Example Response ​

json
{
  "mode": "direct",
  "x": 20
}

Notes ​

  • The answer is rounded to 15 significant digits, so 0.1 × 3 ÷ 3 comes back as 0.1 rather than 0.10000000000000002.
  • a can't be 0 in a direct proportion and c can't be 0 in an inverse one, because each is the divisor. Either returns a 400.
  • An answer outside the range a double can hold (above about 1.8e308, or too close to zero to keep its precision) returns a 400.
  • In the web app you can type 1,5 or 1.5, and Arabic-Indic or Devanagari digits work too. Thousands separators aren't accepted.