Normal distribution calculator
On the standard normal curve the density at 0 is about 0.3989, the height of the bell's peak. Choose density or cumulative probability, enter the value, mean and standard deviation, and get the result with its z-score. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Value
- 0
- Mean
- 0
- Std
- 1
- Function
- Z
- 0
- PDF file
- 0.3989422804
The normal distribution is the bell-shaped Gaussian law that appears in exam scores, measurement error, process control, and any setting where many small independent effects add up. Two numbers pin the curve down: the mean μ that sits at the peak, and the standard deviation σ that stretches or squeezes the width. Once those parameters are known, two different questions come up constantly. The probability density function (PDF) tells you how densely probability sits at a chosen value x — the height of the bell. The cumulative distribution function (CDF) tells you how much probability lies at or below x — the area from minus infinity to that point. This calculator accepts a finite value, mean, and positive standard deviation, plus a function selector of pdf or cdf, and returns the corresponding number together with the standardized z-score. A zero standard deviation is rejected because a Gaussian is not defined when the scale collapses.
What the normal PDF and CDF mean, and how z connects them
A normal law N(μ, σ²) is completely described by its centre and its scale. The mean μ is the location of the peak and the centre of symmetry. The standard deviation σ is a positive width: larger σ flattens and widens the bell, smaller σ concentrates mass around the mean.
The value you send is a point x on that same number line. Standardize first: z equals (x minus μ) divided by σ. That single score says how many standard deviations x sits from the mean, which is the language of printed normal tables and of the empirical 68-95-99.7 rule.
The PDF, written φ(x), is the height of the curve at x. Its closed form is one over σ times the square root of two π, times e to the minus one-half z squared. Density is not a probability by itself; it is probability per unit of x, so it can exceed one when σ is small.
The CDF, written Φ(z), is the area under that same curve from negative infinity up to x, which equals one half times one plus the error function of z over the square root of two. People look the CDF up when they want a percentile rank, a left-tail probability, or P(X ≤ x). Choose function pdf when you need the height; choose function cdf when you need the accumulated area.
Both answers share the same z, so you can switch the selector without restating mean and sigma. Search phrases such as normal distribution calculator, gaussian pdf, and normal cdf all land here because they share the same three numbers and differ only in which function is asked.
What you enter, the formulas and the result
A negative standard deviation is rejected the same way: scale is a positive width, not a signed quantity. Those validation failures are not billed. On success the body echoes the cleaned value, mean, and std, returns z as (value − mean) / std, repeats the selected function, and includes either pdf (the density) or cdf (the cumulative probability in the closed unit interval) plus a short formula string.
Classic checks include the standard normal at value zero with function pdf, which yields density one over the square root of two π, about 0.3989, and the same inputs with function cdf, which yields one half. The two-sided critical value near 1.96 under mean zero and unit σ yields a cumulative probability near 0.975. Numbers are rounded to twelve significant digits so goldens stay stable across runtimes.
Where a normal distribution calculator earns its keep
Search intent for a normal distribution calculator is broader than a dedicated CDF page or a z-score tool. Students and teachers want a single box that can answer both how tall the bell is at this score and what fraction of the class sits at or below this score, without opening two different landings. Exam-prep generators and learning-management plugins need a deterministic oracle for density and cumulative items that share the same mean and sigma.
Quality engineers convert a specification limit into either a density at the limit or a left-tail probability under a process mean and sigma. Product analytics sketches simple normal working models for thresholds before anyone spins up a simulation. Psychometrics maps a raw score to a cumulative rank and, less often, to the density used in item-information formulas.
Finance notebooks express a residual or return level as a Gaussian density or as P(X ≤ x) under a working normal model. A sibling CDF-only calculator exists for people who only ever want Φ(x); this capability exists because people also search for the density and for a combined normal distribution calculator. Failed validation does not consume balance.
Keep requests small, pin the rounded outputs in tests, and you get reproducible Gaussian numbers for homework, widgets, and edge workers without standing up a statistics library of your own.
What you can do with it
Classroom density and percentile checks
Let students send a score, class mean, and sigma, then switch function between pdf (bell height) and cdf (left-tail rank) against the same z.
Exam and LMS auto-grading
Mark Gaussian PDF and CDF items with a deterministic oracle that rejects a zero standard deviation instead of inventing a density.
Process limits and simple risk sketches
Turn a specification or return threshold into φ(x) or P(X ≤ x) under a known process mean and positive sigma, without a stats library.
FAQ
What is the difference between the normal PDF and the CDF?
The PDF φ(x) is the height of the bell at x (probability density, not a probability). The CDF Φ(x) is the area from −∞ to x, equal to P(X ≤ x). Choose function pdf or cdf accordingly.
What happens if the standard deviation is zero?
A normal distribution requires σ > 0; when the scale is zero the density and the z-score are undefined.
What formula does the calculator use?
Both paths start from z = (x − μ) / σ. The PDF is 1/(σ√(2π)) · exp(−½z²). The CDF is ½ (1 + erf(z / √2)), evaluated with a classical error-function approximation.
How do I evaluate the standard normal?
Set mean to 0 and std to 1, then send any finite value. function pdf at 0 yields about 0.3989; function cdf at 0 yields 0.5; function cdf near 1.96 yields about 0.975.
What does the normal distribution calculator cost?
The browser tool is free and runs locally.
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/normal-distribution \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"value":0,"mean":0,"std":1,"function":"pdf"}'const res = await fetch("https://api.kit.forhosting.com/stat/normal-distribution", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"value": 0,
"mean": 0,
"std": 1,
"function": "pdf"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/stat/normal-distribution",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"value": 0,
"mean": 0,
"std": 1,
"function": "pdf"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/stat/normal-distribution", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"value":0,"mean":0,"std":1,"function":"pdf"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"value":0,"mean":0,"std":1,"function":"pdf"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/stat/normal-distribution", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"value": 0,
"mean": 0,
"std": 1,
"function": "pdf"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "stat.normal_distribution",
"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
Input contract, formulas, response shape, and error behaviour
POST a JSON body with four fields. value is the observation x, a finite number; the alias x is accepted if you prefer textbook naming. mean is the finite centre μ; the alias mu is accepted. std is the standard deviation σ and must be a finite number strictly greater than zero; aliases sd, standard_deviation, and sigma are accepted so classroom wording and API naming both work. function is required and must be exactly pdf or cdf — a closed enum, not free text, so the form paints a select and callers cannot invent a third mode. Missing fields, empty strings, NaN, and Infinity fail with invalid_input naming the field. If the standard deviation is zero the request fails with a message that the normal distribution is undefined when σ equals zero, because dividing by σ and forming a density both collapse. Pricing for successful API calls is the published base of $0.002 per item; validation failures do not consume prepaid balance.