Mode calculator
In 1, 2, 2, 3 and 4 the mode is 2, which appears twice. Every value is counted, all values tied for the top count are returned, and a list where each number appears once has no mode. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Values
- 1, 2, 2, 3, 4
- Quantity
- 5
- Calculation mode
- 2
- Modes
- 2
- Frequency
- 2
Students, teachers, and analysts search for a mode calculator when they need that one answer without also computing the mean, the median, or the range. This capability takes a non-empty list of finite numbers, counts how many times each distinct value occurs, and returns the most frequent value or values together with the winning frequency and a short modality label. A unique winner is unimodal. Two values that share the highest count are bimodal. Three or more sharing that count are multimodal. When every value appears once and the list is longer than one entry, classroom convention says there is no mode, and this tool returns an empty modes list rather than pretending every unique number is a winner.
What the mode is, and when a list has more than one
The mode of a list is the value that appears more often than any other. Unlike the mean, which mixes every observation into one average, and unlike the median, which only cares about order after a sort, the mode answers a frequency question: which reading showed up the most. A data set is unimodal when exactly one value owns the highest count, bimodal when two distinct values tie at that highest count, and multimodal when three or more values share it.
Classroom convention also says there is no mode when every value appears exactly once and the list has more than one entry, because then nothing is more frequent than anything else. A single-element list is the trivial unimodal case: that lone value is the mode with frequency one. This calculator implements those rules exactly.
Give it one, two, two, three, four and it returns mode two with frequency two. Give it one, one, two, two, three and it returns both one and two, each with frequency two, labelled bimodal. Give it one, two, three, four and it returns an empty modes array with modality none.
Ties at a frequency greater than one are real modes, not a failure. The same definition works for integer grades, decimal measurements that happen to repeat, and any finite numeric sample you can paste. Because the algorithm only counts, it never sorts for a middle value and never divides a sum, which keeps this dedicated mode page honest: people who searched for the mode get frequency, not a bundle of other summaries they did not ask for.
Where a dedicated mode calculator earns its keep
Classrooms and tutoring platforms use a mode calculator so learners can check the most frequent score, measurement, or coded category without flipping a frequency table by hand and without being distracted by a mean they were not asked to find. Exam-prep generators need a deterministic oracle that marks the all-unique case as no mode instead of silently returning every value, and that rejects an empty sample instead of inventing a zero.
Operations teams watch the mode of discrete sensor codes, Likert-scale answers, or binned production counts because the most common reading is often the one that should drive an alert, not the arithmetic average of those codes. Failed validation does not consume balance, which keeps exploratory scripts cheap while students paste empty cells by mistake. Keep requests within the published size cap, pin the modes array in tests, and you get reproducible frequency answers for homework, LMS plugins, and edge workers without standing up a statistics library of your own.
Prefer this page when the search is specifically for the mode; a combined mean-median-mode landing answers a different query and a different classroom prompt.
What you can do with it
Homework and exam answer keys
Give students a short numeric sample and check their hand-built frequency table against a deterministic mode, including the empty-mode case when every value is unique.
Most common reading in a batch
Summarize quiz scores, Likert answers, or discrete sensor codes by the value that appeared most often, without pulling in mean or median.
Teaching unimodal versus multimodal lists
Show a live unimodal example, a bimodal tie, and an all-unique list so learners see why mode is not always a single number.
FAQ
How do I find the mode of a list of numbers?
Send a non-empty array in values (or numbers, data, list).
What if two numbers appear equally often?
Both are modes. The list is bimodal when two distinct values share the highest frequency greater than one; modes lists them in ascending order.
What if every number appears only once?
When n is greater than one and every frequency is one, there is no mode: modes is empty and modality is none. A single-element list treats that element as the mode.
What happens if the list is empty?
There is no most-frequent value of an empty sample, and failed validation is not charged.
What do unimodal, bimodal and multimodal mean?
Unimodal means one value owns the highest count. Bimodal means two values tie for it, as 1 and 2 do in 1, 1, 2, 2, 3. Multimodal means three or more values share that top count.
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/mode \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"values":[1,2,2,3,4]}'const res = await fetch("https://api.kit.forhosting.com/stat/mode", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"values": [
1,
2,
2,
3,
4
]
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/stat/mode",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"values": [
1,
2,
2,
3,
4
]
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/stat/mode", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"values":[1,2,2,3,4]}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"values":[1,2,2,3,4]}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/stat/mode", 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": [
1,
2,
2,
3,
4
]
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "stat.mode",
"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
The mode is the most frequent value in a list: the number that appears more often than any other. An empty list is rejected with invalid_input and is never charged.
What the mode is, and when a list has more than one
Empty input is not a data set at all, so the task fails with invalid_input instead of inventing a mode of zero or an empty success payload that a grader might treat as a passing answer.
Input contract, response shape, and error behaviour
Numeric strings inside the array are coerced; a comma, semicolon, or whitespace separated string is also accepted for simple text forms and pasted columns. Use it from homework checkers, quiz generators, sensor batch summaries, retail SKU tallies that happen to be encoded as numbers, or any workflow that wants the most frequent reading without installing a statistics package on every machine. 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 behave the same, so existing clients that already send a numbers array can reuse the habit. On success the response includes count as n, values as the parsed list in the order you sent it, mode as a single number when the list is unimodal or an array when it is multimodal or empty when there is no mode, modes as the full ascending array of modal values, frequency as the highest count, mode_count as how many distinct modes were found, modality as one of unimodal, bimodal, multimodal, or none, and frequencies as a table of each distinct value with its count, sorted by count descending then value ascending. Failed validation—missing values, an empty list, non-finite entries, or a list longer than one hundred thousand values—returns invalid_input and is never charged. Pricing is a flat $0.002 per successful request with unit item.
Technical questions
What does the mode calculator cost?
The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.