Fraction to Lowest Terms Calculator
Reduce any fraction to its simplest form in one step: 42/56 becomes 3/4, because both numbers divide by 14. Signs are tidied too, so 6/-8 comes out as -3/4 with a positive denominator. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Numerator
- 42
- Denominator
- 56
- Numerator
- 3
- Denominator
- 4
This fraction to lowest terms calculator reduces a numerator and denominator to their simplest equivalent integers. It finds their greatest common divisor, divides both values by that divisor, and keeps any negative sign on the numerator so the denominator remains positive. The result is deterministic and ready to use in homework checks, calculation pipelines, stored ratios, or generated explanations. Enter two integers and receive only the simplified numerator and denominator, with clear input errors for decimals, missing values, or a zero denominator.
What lowest terms means
A fraction is in lowest terms when its numerator and denominator have no positive common factor greater than one. For example, 42/56 is not yet reduced because both numbers are divisible by fourteen. Dividing both by fourteen gives 3/4, which represents exactly the same rational number but cannot be reduced further using integer factors.
This calculator performs that reduction directly from the two fields you provide. It also treats signs consistently: if the denominator is negative, the sign is moved to the numerator, so 6/-8 becomes -3/4 rather than 3/-4. When the numerator is zero, the canonical result is 0/1 because every valid fraction with a zero numerator has the same value.
Keeping one canonical representation is useful when fractions must be compared, cached, displayed, or passed between systems without several different strings representing the same number. The output contains a simplified numerator and a strictly positive denominator.
How the reduction is calculated
The calculation uses the Euclidean algorithm to find the greatest common divisor of the absolute numerator and denominator. The algorithm repeatedly replaces the larger relationship with a remainder until the remainder is zero. The last nonzero divisor is the greatest common divisor, so dividing both original values by it produces integers with no remaining shared factor.
This approach is exact for the safe integers accepted by the capability and does not convert the fraction to a decimal, where rounding could lose information. It uses no network access, random values, clock, model, or stored state, which means identical inputs always produce identical outputs. Both inputs are validated before arithmetic begins.
A missing value, decimal, nonnumeric value, or integer outside JavaScript's safe range is rejected as an invalid integer. A denominator of zero receives its own clear error because division by zero does not define a rational fraction. These checks prevent a plausible-looking but mathematically invalid result from entering a later calculation.
Using the result reliably
The returned pair can replace the original fraction anywhere an equivalent normalized ratio is expected. This is especially helpful before equality checks: 2/3, 4/6, and -8/-12 all reduce to the same pair, 2 and 3, so applications can compare their normalized fields instead of cross-multiplying every time. It is also useful before formatting fractions for documents, educational feedback, recipe scaling, probability reports, and exact configuration values.
Do not send decimal approximations such as 0.75 and 1 when you mean 3/4; the contract intentionally requires integer components. Since the denominator in a successful result is always positive, downstream code does not need a second sign convention or a special branch for negative denominators.
What you can do with it
Normalize stored ratios
Reduce ratios before saving them so equivalent values share one consistent numerator and denominator.
Check fraction exercises
Generate the canonical reduced pair for comparing a learner's answer with an expected fraction.
Prepare exact calculations
Simplify intermediate fractions without converting them to rounded decimal values.
FAQ
What happens when the numerator is zero?
Every valid zero fraction is normalized to 0/1.
Can the denominator be negative?
Yes. The fraction is reduced and the negative sign is moved to the numerator.
Can I enter decimal numbers?
No. Both inputs must be integers because the capability reduces an integer numerator and denominator.
How can I tell if a fraction is already in lowest terms?
It is in lowest terms when the numerator and denominator share no positive factor greater than 1. 3/4 qualifies, while 42/56 does not, because both of its numbers can still be divided by 14.
Why reduce fractions before comparing them?
Because fractions that look different can be the same number. 2/3, 4/6 and -8/-12 all reduce to 2/3, so comparing the reduced forms tells you straight away whether two fractions are equal.
Related tools
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/math/lowest-term \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"numerator":42,"denominator":56}'const res = await fetch("https://api.kit.forhosting.com/math/lowest-term", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"numerator": 42,
"denominator": 56
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/math/lowest-term",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"numerator": 42,
"denominator": 56
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/math/lowest-term", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"numerator":42,"denominator":56}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"numerator":42,"denominator":56}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/math/lowest-term", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"numerator": 42,
"denominator": 56
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "math.lowest_term",
"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.
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. |
Technical notes
Using the result reliably
Send the numerator and denominator as JSON integers, then read the two fields with the same names from the response. For automated use, each request costs $0.002. Client code should handle the invalid_input error and let the user correct the named field.
Technical questions
What happens if the denominator is zero?
The request returns an invalid_input error because a fraction with a zero denominator is undefined.
How much does an API request cost?
Each API request costs $0.002. The browser calculator can run locally on the page.