ForHosting KIT · Math

Solve for x in a ratio calculator

Solve the missing number in a proportion: 3/4 = 9/x gives 12 for x, and both cross-products equal 36, so you can see the answer holds. Useful for homework, recipes, maps and resizing images. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
Unknown
Right denominator
Left numerator
3
Left denominator
4
Right numerator
9
You get
X
12
Equation
3/4 = 9/x
Solved equation
3/4 = 9/12

The solve for x in a ratio calculator finds the missing numerator or denominator in an equation such as 3/4 = 9/x. Choose the position occupied by x and provide the other three finite numbers. The calculator cross-multiplies the proportion, isolates the unknown, and returns its value with a completed equation, verification products, and readable steps. It also rejects zero denominators and cases that cannot determine one unique value, making the result useful for homework, scaling, recipes, maps, and automated checks.

How equivalent ratios determine the unknown

Two ratios are equivalent when they describe the same quotient. Writing the proportion as a/b = c/d gives the cross-product identity a × d = b × c, provided both denominators are nonzero. That identity turns every supported problem into one multiplication followed by one division.

If a is unknown, calculate b × c ÷ d. If b is unknown, calculate a × d ÷ c. If c is unknown, calculate a × d ÷ b.

If d is unknown, calculate b × c ÷ a. The response includes the original equation with x, the completed equation, and both cross-products. Equal cross-products are a direct numerical check that the solved ratios are equivalent.

The method is deterministic and uses no guessing, iteration, network request, random value, or clock. It handles negative and decimal terms as ordinary real numbers, while enforcing the mathematical rule that a denominator can never be zero.

Edge cases, validation, and practical uses

A known left or right denominator equal to zero is rejected immediately because division by zero does not define a ratio. When the unknown itself is a denominator, the calculated answer must also be nonzero. The calculator rejects that situation rather than choosing an arbitrary value.

Missing terms, nonnumeric values, infinities, and an unsupported unknown name are invalid as well. These rules matter beyond worksheets. A designer can recover a missing image dimension from an established width-to-height ratio; a cook can scale one ingredient against a known recipe proportion; a map user can solve a distance from a scale ratio; and a developer can generate expected values for proportional-data tests.

Keep units consistent on corresponding terms before solving. If one ratio uses centimeters and the other uses meters, convert first or the arithmetic may be correct while the interpretation is wrong. This capability solves a single missing term in a direct proportion only.

It does not solve compound proportions, inequalities, nonlinear rational equations, or word problems that have not yet been translated into four ratio positions.

Check proportion homework

Solve a missing numerator or denominator and compare the returned isolation and cross-product verification with handwritten work.

Scale designs and recipes

Recover one missing dimension or quantity while preserving a known width, mixture, serving, or ingredient ratio.

Validate proportional data

Generate deterministic expected values and verification products for forms, spreadsheets, learning systems, and application tests.

How do I solve for x in a ratio?

Cross-multiply a/b = c/d into a × d = b × c, then divide by the coefficient multiplying x. The response shows that isolation explicitly.

Are decimals and negative numbers supported?

Yes, finite decimal and negative terms are supported. Denominators still cannot be zero, and results are rounded to twelve decimal places.

Why does a zero numerator sometimes produce an error?

Some proportions containing zero are true for many possible denominator values and therefore do not determine one unique x. The calculator rejects those indeterminate cases.

What happens if a denominator in the proportion is zero?

The calculation is refused, because division by zero does not define a ratio. The same applies when the missing term is a denominator and the answer would come out as zero.

Do the units have to match before solving a proportion?

Yes, corresponding terms should use the same unit. If one ratio is in centimeters and the other in meters, convert first; otherwise the arithmetic is right but the meaning of the answer is wrong.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/algebra/ratio-solver

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/algebra/ratio-solver \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"unknown":"right_denominator","left_numerator":3,"left_denominator":4,"right_numerator":9}'
{
  "unknown": "right_denominator",
  "left_numerator": 3,
  "left_denominator": 4,
  "right_numerator": 9
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "algebra.ratio_solver",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

How equivalent ratios determine the unknown

For example, 3/4 = 9/x becomes 3 × x = 4 × 9, so x = 36 ÷ 3 = 12.

Choosing an unknown position and reading the response

Omit the numeric field for that selected position and supply finite numbers for all three remaining positions. This explicit position contract avoids ambiguous text parsing and makes requests easy to generate from a form, spreadsheet, classroom platform, or test suite. The two verification products should match. Send the unknown field as one of four canonical position names: left_numerator, left_denominator, right_numerator, or right_denominator. A successful response returns x, repeats the unknown position, displays the source equation, provides solved_equation with the value substituted, and reports cross_products.left and cross_products.right. It also supplies three short steps: cross-multiply, isolate the selected term, and substitute the answer for verification. A request such as left_numerator 3, left_denominator 4, right_numerator 9, with right_denominator selected as unknown, returns x equal to 12 because 3 × 12 and 4 × 9 both equal 36. Invalid requests return invalid_input instead of a misleading numeric result, so clients can distinguish malformed or indeterminate proportions from valid answers without inspecting prose.

Edge cases, validation, and practical uses

Some zero-numerator arrangements do not identify one unique denominator: for instance, 0/x = 0/5 is true for every nonzero x, so there is no single answer to return.

Can x be in any of the four positions?

Yes. Select left_numerator, left_denominator, right_numerator, or right_denominator as unknown and omit that numeric field.

What does the ratio solver cost?

It runs free in the browser. A successful API request costs $0.002 per item; invalid requests return invalid_input.

Read the full KIT documentation →