Ascending order
Sort numbers from smallest to largest: with 9, -2, 0, 1 and four and a half entered twice, you get -2 first and 9 last, with both copies of four and a half kept in between, plus the count, minimum and maximum. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Values
- 9, -2, 4.5, 0, 4.5, 1
- Quantity
- 6
- Sorted
- -2, 0, 1, 4.5, 4.5, 9
- Min
- -2
- Max
- 9
Ascending order is the everyday request behind homework checks, spreadsheet cleanup, and any pipeline that must line numbers up from smallest to largest before a later statistic or report. This calculator accepts a list of finite numbers, validates every element, and returns the same values sorted from the minimum to the maximum. Use this page when the search is specifically to sort numbers in ascending order, not to alphabetize text lines or to compute a five-number summary that hides the full sequence.
What ascending order means on a list of numbers
Ascending order means each next value is greater than or equal to the previous one: the first position is the minimum and the last is the maximum. That is the order-statistics layout every later rank, percentile, and median calculation assumes, which is why people search for an ascending-order calculator as its own job rather than as a hidden step inside another statistic. This capability implements a stable merge sort.
Equal values keep their original relative order, which matters when two measurements share a number but came from different rows and a later join still needs to know which copy was first. The input may mix integers, decimals, zeros, and negatives; two copies of four point five stay as two copies, not one. Scientific notation such as 1e-3 is a finite number and is accepted.
An empty list is also rejected, because there is no smallest element of nothing. Sorting is not rounding and not unique-ing: the returned list has the same length as the validated input, only the positions change.
What you can do with it
Homework and exam answer keys
Give students an unsorted numeric sample and check that they lined every value up from smallest to largest, including ties and negatives.
Clean a column before analysis
Sort sensor batches, quiz scores, or spreadsheet columns into ascending order before charting, ranking, or computing later statistics.
Prepare ordered input for pipelines
Turn a messy list of finite numbers into a deterministic ascending array that the next step can consume without a local sort.
FAQ
What happens if an element is not a finite number?
NaN, Infinity, blanks, booleans, objects, and free text are rejected and are never billed.
Are duplicate numbers kept?
Yes. Sorting does not unique the list. Two copies of the same value stay two copies, in their original relative order.
Does this sort text or only numbers?
Only finite numbers. For alphabetical strings use a locale sort; for text lines use a line sort. This page is the numeric smallest-to-largest query.
What does the ascending order calculator cost?
The browser tool is free and runs locally.
Do equal numbers keep their original order?
Yes. The sort is stable, so when two entries share the same value they stay in the order they had, which helps when a later step still needs to know which copy came first.
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/stat/ascending-order \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"values":[9,-2,4.5,0,4.5,1]}'const res = await fetch("https://api.kit.forhosting.com/stat/ascending-order", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"values": [
9,
-2,
4.5,
0,
4.5,
1
]
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/stat/ascending-order",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"values": [
9,
-2,
4.5,
0,
4.5,
1
]
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/stat/ascending-order", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"values":[9,-2,4.5,0,4.5,1]}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"values":[9,-2,4.5,0,4.5,1]}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/stat/ascending-order", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"values": [
9,
-2,
4.5,
0,
4.5,
1
]
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "stat.ascending_order",
"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 | 100000 |
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
Duplicates are kept; negatives, zeros, and decimals are first-class; NaN, Infinity, and non-numeric tokens fail with invalid_input and are never billed.
What ascending order means on a list of numbers
What is not accepted is anything outside the finite IEEE set: missing cells, blank tokens, NaN, plus or minus Infinity, booleans, objects, and free text. Those fail with invalid_input naming the offending index so a student or a pipeline can fix the cell instead of silently dropping it.
How to send a list and what the calculator returns
On success the body includes count as the length n, sorted as the ascending list, min as the first order statistic, and max as the last. Classic classroom example: the list nine, negative two, four point five, zero, four point five, one becomes negative two, zero, one, four point five, four point five, nine, with count six, min negative two, and max nine. Use it from homework checkers, CSV cleanup steps, sensor batch jobs, and any workflow that wants a dedicated ascending-order contract rather than an alphabetical locale sort or a one-line summary that throws the ordered list away. POST a JSON body with one required field named values: a non-empty array of finite numbers. Aliases numbers, data, and list are accepted and mean the same thing. Failed validation — missing values, an empty list, a list longer than one hundred thousand entries, or any non-finite element — returns invalid_input and is never charged. Pricing is a flat $0.002 per successful request with unit item.
When to use this tool, limits, and nearby searches
Prefer this page when the search intent is to sort numbers in ascending order or from smallest to largest. If you later need descending order, reverse the returned list; this landing is dedicated to the ascending query people actually type when they want numbers lined up from smallest to largest. Keep lists within the published size cap so the Worker and the browser stay interactive; one hundred thousand finite numbers is ample for classroom sets and most operational samples. Nearby tools do different jobs and should not absorb this query: locale.sort alphabetizes strings with accents; str.sort_lines reorders text lines; a five-number summary sorts internally only to report min, quartiles, and max. This capability returns the full ordered list so you can copy it, chart it, or feed it to the next step. Failed tasks that return invalid_input do not consume prepaid balance, which keeps exploratory scripts cheap while someone pastes a header row by mistake.
Technical questions
How do I sort a list of numbers in ascending order?
Send a non-empty list of finite numbers in the values field (aliases numbers, data, list). The response returns count, the sorted list from smallest to largest, plus min and max.