Least to greatest fractions
Type several fractions and get them back sorted from least to greatest without rounding: 1/2, 1/3, 1/4 and 3/4 come out as 1/4, 1/3, 1/2, 3/4. Negatives, zero and improper fractions keep their place on the number line. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Ordering fractions from least to greatest is the classroom step that turns unlike denominators into a single number-line ranking. Given several numerator and denominator pairs, this calculator compares each pair exactly by cross-multiplication and returns the same fractions in ascending order so you can copy the ranked list without rounding to a decimal first. One-half, one-third, and one-fourth become one-fourth, then one-third, then one-half; mixed lists that include negatives, zeros, and improper fractions keep those signs and those tops. Equivalent fractions such as one-half and two-fourths compare equal and both copies remain, in their original relative order.
What least-to-greatest order means for a list of fractions
Two fractions a over b and c over d sit on the same number line even when their bottoms differ. Classroom language says to order them from least to greatest when the first listed value is the smallest and each next value is greater than or equal to the one before it. The reliable comparison does not convert to a rounded decimal first, because one-third and three-tenths can collide once you keep only a few digits.
Exact order uses the cross-product identity: a over b minus c over d equals (a times d minus b times c) over (b times d). The sign of that difference is the sign of the numerator times the sign of the denominator, so the comparison stays exact for negatives, zeros, and improper fractions. One-half, one-third, and one-fourth therefore rank as one-fourth, then one-third, then one-half, matching the number line and matching every textbook that rewrites unlike fractions over a common denominator before comparing.
Equivalent fractions such as one-half and two-fourths compare equal; this calculator keeps both copies and preserves their original relative order, which matters when two worksheet rows share a value but came from different students. Improper fractions such as five-fourths sit to the right of one, and a negative numerator places that term to the left of zero. The implementation never reduces the inputs before ranking, because the search phrase least to greatest fractions asks for the ranked list of the fractions you typed, not a rewritten reduced set.
Overflow of a floating-point mantissa cannot reorder a pair: each comparison multiplies with arbitrary-precision integers, then only the sign of the difference is used. That is the whole job: a ranked list, not a sum and not a lowest common denominator.
What to enter and what you get back
Each record needs a finite integer numerator and a non-zero integer denominator. Numerators may be negative, zero, or positive; a negative denominator is valid and is ranked by the sign of the quotient, so one over negative two sits with negative one-half. A string such as one-half written as 1/2, or a pair [1, 2], is accepted in the same list.
A non-integer term or a value outside the published absolute bound is rejected on the same rule. On success the body returns count, the number of input rows; ordered, the same fractions ranked from least to greatest; displays, copy-ready strings such as 1/4; order, the original zero-based indices after the sort; fractions, the parsed pairs in input order; and formula, the string that restates the cross-product test. Example: one-half, one-third, one-fourth, and three-fourths yield ordered one-fourth, one-third, one-half, three-fourths.
Where ordering fractions comes in handy
Classrooms and tutoring platforms use a least to greatest fractions calculator so learners can check the number-line ranking of unlike fractions without converting each term to a rounded decimal that hides exact ties. Exam-prep generators need a deterministic oracle that marks a zero denominator as invalid input instead of returning NaN that a buggy grader might treat as success.
Nearby tools do different jobs and should not absorb this query: a lowest common denominator calculator rewrites bottoms without ranking; an ascending-order number sort ranks already-decimal values, not a over b pairs; a fraction-to-decimal converter emits one quotient, not an ordered list. Failed validation does not consume balance. Keep requests inside the forty-fraction cap, pin the ordered array in tests, and you get reproducible rankings for homework, LMS plugins, and edge workers without standing up symbolic math infrastructure of your own.
What you can do with it
Classroom and homework checks
Let students submit two or more fractions and verify the least-to-greatest ranking against the number-line order taught in class, including negatives and equivalent copies.
Exam and LMS auto-grading
Mark order-the-fractions items with a deterministic oracle that rejects a zero denominator and never reorders a pair through decimal rounding.
Worksheet generators and mixed lists
Rank a generated set of unlike fractions before printing a key, or order rational rates in a notebook without converting each term to a float first.
FAQ
How does the calculator order fractions from least to greatest?
Each pair is compared by exact cross-multiplication: a/b versus c/d uses the sign of (ad − bc) times the sign of (bd).
What happens if a denominator is zero?
A denominator must be a non-zero integer; zero is undefined and is not billed.
Are equivalent fractions such as 1/2 and 2/4 treated as equal?
Yes. They compare equal and both copies remain in the ordered list, in their original relative order. The calculator does not reduce inputs before ranking.
Can the list include negative fractions and zero?
Yes. A negative numerator (or a negative denominator) places that term to the left of zero. A zero numerator is a valid zero and ranks between negatives and positives.
Why not just convert the fractions to decimals and compare?
Because rounding can put two values in the wrong order or make them look equal: 1/3 and 3/10 can collide once only a few digits are kept. Comparing by cross-multiplication keeps every comparison exact, however close the fractions are.
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/least-to-greatest-fractions \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"fractions":[{"numerator":1,"denominator":2},{"numerator":1,"denominator":3},{"numerator":1,"denominator":4},{"numerator":3,"denominator":4}]}'const res = await fetch("https://api.kit.forhosting.com/math/least-to-greatest-fractions", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"fractions": [
{
"numerator": 1,
"denominator": 2
},
{
"numerator": 1,
"denominator": 3
},
{
"numerator": 1,
"denominator": 4
},
{
"numerator": 3,
"denominator": 4
}
]
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/math/least-to-greatest-fractions",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"fractions": [
{
"numerator": 1,
"denominator": 2
},
{
"numerator": 1,
"denominator": 3
},
{
"numerator": 1,
"denominator": 4
},
{
"numerator": 3,
"denominator": 4
}
]
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/math/least-to-greatest-fractions", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"fractions":[{"numerator":1,"denominator":2},{"numerator":1,"denominator":3},{"numerator":1,"denominator":4},{"numerator":3,"denominator":4}]}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"fractions":[{"numerator":1,"denominator":2},{"numerator":1,"denominator":3},{"numerator":1,"denominator":4},{"numerator":3,"denominator":4}]}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/math/least-to-greatest-fractions", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"fractions": [
{
"numerator": 1,
"denominator": 2
},
{
"numerator": 1,
"denominator": 3
},
{
"numerator": 1,
"denominator": 4
},
{
"numerator": 3,
"denominator": 4
}
]
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "math.least_to_greatest_fractions",
"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_items | 40 |
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
A denominator of zero is undefined, so the task fails with invalid_input instead of a NaN ranking that a buggy grader might treat as success. Successful API calls use the published $0.002 base price; validation failures are not billed.
Input contract, response shape, and error behaviour
POST a JSON body with one required field, fractions, an array of two to forty records. Aliases items, values, and list are accepted so scripts can reuse existing payloads, and each row also accepts n or num for the numerator and d, den, or denom for the denominator. Missing fractions, a list shorter than two rows, or more than forty rows fail with invalid_input naming the field. Pair the response with your own common-denominator step if you also need rewritten terms; this endpoint ranks the list and does not emit an LCD or a mixed number.
Where a least-to-greatest fractions API earns its keep
Worksheet and LMS plugins that ask students to order a set can call this endpoint first, show the ranked list, and only then ask for a common denominator or a sum, which keeps the grading of the order step separate from the grading of the rewrite step.
Technical questions
What does the least to greatest fractions calculator cost?
The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.