Literal equation solver
A literal equation uses letters to represent several quantities, and rearranging it means isolating one chosen letter without assigning numerical values to the others.
Run — free
Enter a formula such as y = m*x + b and choose x to receive x = (y - b) / m, along with normalized input, remaining symbols, and concise steps. The solver handles equations that are linear in the target, including parentheses, explicit or implied multiplication, and division by expressions that do not contain that target. It runs deterministically in the browser, while the same result is available through the API for $0.002 per successful request.
What it means to solve a literal equation for one variable
A literal equation is a relationship among named quantities rather than an equation containing only one unknown and several fixed numbers. Familiar examples include distance equals rate times time, force equals mass times acceleration, and a straight-line equation written as y equals m times x plus b. To solve one of these formulas for a selected variable, every operation applied to that variable must be undone while equality is preserved. If y equals m times x plus b, subtracting b from both sides gives y minus b equals m times x, and dividing both sides by m gives x equals the quantity y minus b divided by m. This solver performs that rearrangement symbolically. Its response contains the target, the isolated expression, a complete solved equation, a normalized version of the original input, the other variables that remain, and a short sequence of algebra instructions. Symbols are not assigned hidden values, so the result remains a reusable formula. The tool focuses on equations that are linear in the chosen target: the target may occur in sums, differences, multiplication by target-free factors, and numerators divided by target-free expressions. That scope covers many classroom, science, engineering, finance, and spreadsheet formulas while keeping the answer transparent and deterministic. A result should still be read with the original formula's domain restrictions in mind, especially when the final step divides by a symbolic coefficient that must be nonzero.
How to enter formulas and understand supported rearrangements
Provide exactly one equals sign and name the variable you want isolated. Identifiers begin with a letter or underscore and may continue with letters, digits, or underscores, so names such as velocity, r2, and initial_speed are valid. The parser accepts decimal numbers, parentheses, addition, subtraction, multiplication, division, and exponentiation. You may write multiplication explicitly as m*x or imply it with adjacency as mx only when the intended symbols are unambiguous: because mx is read as one identifier, write m x, m*x, or m(x) when m and x are separate variables. Parentheses can group a factor or numerator, and ordinary operator precedence is respected. The solver examines both sides and represents each as a symbolic coefficient times the target plus a target-free remainder. It then subtracts the coefficients, moves the remainders, and divides once to isolate the requested identifier. A formula may contain powers of other symbols, but the chosen target must occur only to the first power. The solver deliberately rejects target variables in denominators, powers, or both factors of the same product, because those structures are nonlinear and may require multiple branches or extra assumptions. It also rejects equations in which the target disappears after like terms are collected, since such an equation is either an identity or a contradiction rather than a unique symbolic solution. Error messages identify these limits instead of presenting a plausible-looking but incomplete rearrangement. Inputs are capped at 1,000 characters and 300 tokens to keep browser and API execution bounded.
Using isolated formulas accurately in study and technical work
Rearranged formulas are useful wherever the known and unknown quantities change from one calculation to the next. A physics student can turn F = m*a into a = F / m before substituting measurements. An electronics worksheet can isolate current, resistance, or voltage from a linear form, while a geometry exercise can rearrange a perimeter relationship for one dimension. In software, the symbolic expression can become a documented implementation rule, a test fixture, or a check against a formula copied from a specification. Analysts can rearrange affine pricing and forecasting equations before placing them into a spreadsheet cell. Teachers can use the returned steps to emphasize that the same operation is applied to both sides rather than treating transposition as an unexplained sign-changing trick. Always retain mathematical conditions implied by division: solving m*x = y for x produces y / m, which assumes m is not zero. Also verify units after rearrangement; dimensional consistency is a powerful way to catch an incorrectly entered formula even when its algebra is syntactically valid. This capability does not substitute numerical values, simplify with domain-specific identities, choose among roots, or solve trigonometric, logarithmic, or general polynomial equations. Those problems need solvers that can describe branches and domains. For supported linear literal equations, however, execution is pure and reproducible: identical text and target produce identical JSON without a network request, random choice, stored state, or time-dependent value. Interactive browser use is free, and a successful API call costs $0.002 when you need the same rearrangement in an automated workflow.
What you can do with it
Science formula rearrangement
Isolate acceleration, time, mass, or another linearly occurring quantity before inserting measured values.
Algebra teaching and homework
Show the collected coefficient and division steps for literal-equation exercises without hiding the symbolic logic.
Formula checks in software
Generate a deterministic isolated expression for documentation, spreadsheet rules, fixtures, and implementation reviews.
FAQ
What does the literal equation solver cost?
It is free to use in the browser. Each successful API request costs $0.002; invalid input is not charged.
Can the target appear on both sides of the equation?
Yes. The solver collects linear target terms from both sides before isolating the target, provided their symbolic coefficient does not cancel completely.
Does the solver support implicit multiplication?
Yes, adjacent factors such as 2x, m(x), or m x imply multiplication. Write m*x or m x when two one-letter variables must remain distinct, because mx is one identifier.
Why is a target in a denominator or exponent rejected?
Those forms are nonlinear and can require domain restrictions, roots, or multiple solution branches. This capability returns only a unique linear symbolic rearrangement.
Does the result include assumptions such as a denominator being nonzero?
The expression preserves symbolic division, so any denominator must be nonzero. Review those conditions from the original formula before substituting values.
For developers — API access
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.
API endpoint
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.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/algebra/literal-equation \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"equation":"y = m*x + b","target":"x"}'const res = await fetch("https://api.kit.forhosting.com/algebra/literal-equation", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"equation": "y = m*x + b",
"target": "x"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/algebra/literal-equation",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"equation": "y = m*x + b",
"target": "x"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/algebra/literal-equation", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"equation":"y = m*x + b","target":"x"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"equation":"y = m*x + b","target":"x"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/algebra/literal-equation", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"equation": "y = m*x + b",
"target": "x"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "algebra.literal_equation",
"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.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Limits
max_equation_chars | 1000 |
max_tokens | 300 |
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |