Gutenberg-Richter b Value Calculator
The Gutenberg-Richter b value calculator estimates the slope of the earthquake frequency-magnitude relationship from a complete catalog sample.
Run — free
Supply finite magnitudes, the catalog completeness magnitude when known, and the magnitude bin width. The calculator applies the maximum likelihood Aki estimator with the conventional half-bin correction and reports the b value together with the sample size and intermediate values. It is designed for reproducible screening, teaching, and catalog analysis rather than completeness detection or uncertainty estimation.
Prepare a complete magnitude sample
Begin with earthquake magnitudes drawn from one study region, time interval, magnitude scale, and processing workflow. The Gutenberg-Richter relationship is meaningful only when the events represent the population you intend to characterize. Determine the magnitude of completeness before calculating the b value, using a suitable catalog assessment outside this calculator. Then include only events at or above that threshold. If you omit completeness_magnitude, the calculator uses the smallest supplied magnitude, which is convenient for an already filtered sample but is not an independent completeness test. Every magnitude must be a finite number, and the sample cannot be empty. Values below an explicitly supplied completeness magnitude are rejected instead of being silently discarded, because silent filtering can hide a mismatch between the documented method and the data actually analyzed. Keep magnitude types consistent: mixing local, moment, duration, or converted magnitudes may alter the distribution. Also review duplicate events, quarry blasts, and catalog changes before interpreting the result as a property of seismicity.
Understand the Aki maximum likelihood estimate
The calculator first computes the arithmetic mean of the supplied magnitudes. It then evaluates the Aki estimate as log base ten of e divided by the difference between the mean magnitude and the corrected lower threshold. That corrected threshold is the completeness magnitude minus one half of the bin width. The half-bin term accounts for discretized or rounded magnitudes, so the bin width should match the catalog resolution, commonly the spacing at which magnitudes are reported. It must be positive; a zero or negative value has no valid role in this correction. The returned intermediate fields make the calculation auditable: sample_size shows how many events entered the estimate, mean_magnitude records their mean, and the threshold and bin width repeat the effective settings. Results are rounded only at the output boundary for stable serialization. No regression line is fitted, no random resampling is performed, and no network data is fetched. The same inputs therefore always produce the same result.
Interpret the result with appropriate caution
A b value describes the relative abundance of smaller and larger earthquakes within the selected complete sample. A larger estimate generally indicates a steeper frequency-magnitude distribution, while a smaller estimate indicates a comparatively greater share of larger events. Interpretation should remain tied to the sampling design. Changes in network sensitivity, completeness threshold, magnitude calibration, spatial boundaries, time windows, or aftershock treatment can shift the estimate even when the underlying process has not changed. Compare catalogs only when those choices are compatible and clearly documented. This calculator returns the point estimate, not its standard error, confidence interval, goodness of fit, or statistical significance. Small samples can yield unstable point estimates, and a numerical result alone does not establish a meaningful physical difference between regions or periods. For operational research, pair the estimate with completeness analysis, uncertainty calculation, sensitivity checks across reasonable thresholds, and plots of the observed frequency-magnitude distribution. API use costs $0.002 per request, while the deterministic calculation is also suitable for repeated local checks.
What you can do with it
Screen a complete seismic catalog
Compute a reproducible point estimate after filtering a regional catalog at a documented completeness magnitude.
Compare defined study windows
Apply the same estimator settings to compatible spatial or temporal samples before conducting formal uncertainty analysis.
Teach frequency-magnitude analysis
Show how the sample mean, completeness threshold, and bin correction determine the maximum likelihood estimate.
FAQ
What estimator does the calculator use?
It uses the maximum likelihood Aki estimator with a half-bin correction: log10(e) divided by the mean magnitude minus the completeness magnitude plus half a bin.
What happens if I omit the completeness magnitude?
The smallest supplied magnitude becomes the completeness magnitude. This assumes you already provided a complete, filtered sample; it does not estimate completeness.
What should the bin width represent?
Use the magnitude reporting or discretization interval of the catalog. The default is 0.1 and the value must be greater than zero.
Does the result include uncertainty?
No. The output is a deterministic point estimate with its sample size and intermediate values. Calculate uncertainty separately for scientific comparisons.
Can the magnitude array be empty?
No. An empty sample returns an invalid input error because a mean and b value cannot be calculated without observations.
How much does an API calculation cost?
Each API request costs $0.002.
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/earth/b-value-gutenberg-richter \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"magnitudes":[2.1,2.3,2.4,2.7,3,3.2]}'const res = await fetch("https://api.kit.forhosting.com/earth/b-value-gutenberg-richter", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"magnitudes": [
2.1,
2.3,
2.4,
2.7,
3,
3.2
]
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/earth/b-value-gutenberg-richter",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"magnitudes": [
2.1,
2.3,
2.4,
2.7,
3,
3.2
]
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/earth/b-value-gutenberg-richter", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"magnitudes":[2.1,2.3,2.4,2.7,3,3.2]}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"magnitudes":[2.1,2.3,2.4,2.7,3,3.2]}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/earth/b-value-gutenberg-richter", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"magnitudes": [
2.1,
2.3,
2.4,
2.7,
3,
3.2
]
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "earth.b_value_gutenberg_richter",
"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. |