Weibull distribution calculator
Get the Weibull density or cumulative probability at a point: with shape 2, scale 1 and x of 1 the density is 2/e. A shape above 1 means wear-out, exactly 1 is the exponential law and below 1 means early failures. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Shape
- 2
- Scale
- 1
- X
- 1
- Kind
- Probability
- 0.7357588823
The Weibull distribution is the workhorse of reliability engineering and lifetime analysis: it describes how long a component lasts, how wind speeds are distributed, and how failure risk grows or shrinks with age. This calculator evaluates either the probability density or the cumulative probability at a point x from a positive shape parameter and a positive scale parameter. Shape greater than one models wear-out, shape equal to one recovers the exponential law, and shape less than one models infant mortality.
How the Weibull PDF and CDF are defined
The two-parameter Weibull distribution is a continuous law on the non-negative real line, fully determined by a shape parameter k greater than zero and a scale parameter λ greater than zero. The probability density is identically zero for every negative x. At a non-negative x it equals (k divided by λ) times (x divided by λ) raised to the power (k minus one), multiplied by the exponential of the negative of (x divided by λ) raised to k.
The cumulative distribution is the integral of that density from minus infinity up to x: it is zero on the negatives, and for x at or above zero it equals one minus the exponential of minus (x over λ) to the power k. Those two closed forms are what this calculator evaluates. Shape is the parameter people interpret first.
When k equals one the Weibull is exactly the exponential distribution with mean λ and a constant hazard rate. When k is greater than one the hazard increases with age, which is the classic wear-out or fatigue story for mechanical parts, bearings, and aging hardware. When k is less than one the hazard decreases, which is the infant-mortality story for early defects that fail quickly and then settle.
Scale stretches or compresses the time axis without changing the shape of the curve: the median lifetime is λ times (the natural logarithm of two) raised to one over k, so doubling λ doubles every quantile. Evaluation is a handful of logarithms, powers, and exponentials.
Where a Weibull distribution calculator earns its keep
Reliability engineers and maintenance planners live on Weibull plots: given a shape fitted from failure times and a scale in hours or cycles, they need the density or the cumulative probability at a planned inspection age, a warranty horizon, or a replacement interval. Wind-energy analysts use the same two-parameter family for hub-height wind speed, then read the density at a cut-in speed or the cumulative probability below a cut-out threshold.
Quality and warranty teams convert a fitted Weibull into the chance that a unit has already failed by a given age, which is exactly the CDF at that age, without standing up a statistics workstation for a three-number query. Introductory statistics and actuarial courses assign Weibull PDF and CDF drills next to the exponential and Rayleigh special cases, and they need a deterministic oracle rather than a random simulation that would change between runs.
Data scientists validate Monte Carlo samplers of lifetime models by comparing simulated frequencies against the closed-form density and cumulative at modest x before scaling the draws. If you later need three-parameter location-shifted Weibull, inverse quantiles, hazard or survival tables, maximum-likelihood fitting from a sample, or a different lifetime family such as lognormal or gamma, treat those as separate search intents rather than overloading this landing.
Keep shape and scale strictly positive, pick pdf or cdf on purpose, and remember that a density may exceed one while a cumulative probability always lies in zero to one.
What you can do with it
Reliability and warranty ages
Evaluate the Weibull density or the chance a unit has failed by a planned inspection, warranty horizon, or replacement interval from fitted shape and scale.
Homework and exam keys
Compute textbook Weibull PDF and CDF values for shape, scale, and x with a deterministic oracle that rejects non-positive parameters.
Wind speed and lifetime simulators
Check Monte Carlo samplers of Weibull wind or lifetime models against the closed-form density and cumulative at chosen points before scaling draws.
FAQ
What formula does the Weibull distribution use?
For shape k > 0 and scale λ > 0 the PDF is f(x) = (k/λ)(x/λ)^{k−1} exp(−(x/λ)^k) when x ≥ 0 (and 0 when x < 0). The CDF is F(x) = 1 − exp(−(x/λ)^k) when x ≥ 0 (and 0 when x < 0).
What happens if shape or scale is not positive?
A Weibull law requires k > 0 and λ > 0; zero or negative values are rejected and are not billed.
What is the difference between kind pdf and kind cdf?
pdf returns the probability density at x, which may be greater than one. cdf returns the cumulative probability P(X ≤ x), which always lies between 0 and 1. The default is pdf.
Which numbers do I send?
Send shape (k), scale (λ), and x. Optionally send kind as pdf or cdf (default pdf). Integer or decimal strings are accepted. Shape and scale must be positive.
What does the Weibull shape value tell me?
It shows how the risk of failure changes with age. Above 1 the risk grows over time, the wear-out pattern of bearings and aging parts; exactly 1 gives the exponential law with a constant risk; below 1 the risk falls, as with early defects.
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/weibull-distribution \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"shape":2,"scale":1,"x":1}'const res = await fetch("https://api.kit.forhosting.com/stat/weibull-distribution", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"shape": 2,
"scale": 1,
"x": 1
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/stat/weibull-distribution",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"shape": 2,
"scale": 1,
"x": 1
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/stat/weibull-distribution", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"shape":2,"scale":1,"x":1}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"shape":2,"scale":1,"x":1}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/stat/weibull-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
{
"shape": 2,
"scale": 1,
"x": 1
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "stat.weibull_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
Requests that send a non-positive shape or scale fail with invalid_input instead of inventing a density.
How the Weibull PDF and CDF are defined
At the origin the density is finite only when k is at least one; if you ask for the PDF at x equals zero with a shape strictly below one the mathematical value is infinite, and this endpoint rejects the request instead of returning a non-JSON Infinity. There is no random sampling, no table interpolation, no network lookup, and no clock involved, so the same triple of numbers always produces the same IEEE result.
Input contract, response fields, and the positivity error
Numeric strings are accepted so form widgets can submit text fields without client-side casting. Missing fields, empty strings, NaN, and Infinity fail the same way and are not billed. Negative x is legal and returns probability zero, which is the support of the standard two-parameter Weibull. Classic checks include shape two, scale one, x one, kind pdf, which yields density two over e; and the same numbers with kind cdf, which yields one minus one over e. Asking for the PDF at x equals zero with shape one half is rejected because the density diverges at the origin. POST a JSON body with three required finite numbers and an optional kind. Shape is the Weibull k (aliases k or alpha). Scale is the Weibull λ (aliases lambda or theta). The evaluation point is x (aliases value or t). Kind selects the quantity: pdf for the probability density, or cdf for the cumulative probability F(X is at most x); it defaults to pdf and also accepts the alias function. Kind must be pdf or cdf when provided; any other token is invalid_input. On success the body echoes cleaned shape, scale, and x, returns kind as pdf or cdf, returns probability as the IEEE double for that quantity, and supplies formula as the matching closed-form string. Pricing for successful API calls is the published base of $0.002 per item; the browser tool remains free.
Where a Weibull distribution calculator earns its keep
Educators build answer keys and auto-graders that pin a single IEEE value for shape, scale, x, and kind. Because this capability is a pure parse engine, API pricing is the published base of $0.002 per successful item and failed validation does not consume balance.
Technical questions
What does the Weibull distribution calculator cost?
The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.