Gear pitch diameter calculator
This gear pitch diameter calculator turns two standard spur gear specifications—the metric module and number of teeth—into the theoretical pitch diameter used for layout and meshing.
Run — free
It applies the direct relationship between module, tooth count, and pitch-circle size, giving designers a quick, repeatable result without measuring outside diameter or estimating from a drawing. Use it when selecting mating gears, establishing shaft locations, checking a catalog part, or preparing an early mechanical layout before detailed tooth geometry is available.
What pitch diameter represents
Pitch diameter is the diameter of the imaginary pitch circle on which a spur gear is treated as rolling against its mate without slipping. It is not the physical outside diameter measured across the tooth tips, and it is not the root diameter at the bottoms of the tooth spaces. That distinction matters because gear ratios, nominal center distances, and tangential pitch-line velocities are based on pitch circles. For a standard metric spur gear, the module describes pitch-circle size per tooth, while the tooth count says how many equal pitches fit around the gear. Multiplying those values gives the pitch diameter in the same length unit used for the module. A module stated in millimetres therefore produces a pitch diameter in millimetres. The calculator reports the supplied values and the formula with the result, making it easier to carry the number into a drawing, spreadsheet, or design review without losing the assumptions behind it.
How to enter module and tooth count
Enter the metric module as a positive finite number and the tooth count as a positive whole number. Common modules include values such as 0.5, 1, 1.5, 2, and 2.5, but the calculator does not restrict you to a preferred manufacturing series. The tooth count must be an integer because a manufactured gear cannot have a fractional tooth. For example, a module of 2.5 millimetres and 24 teeth produces a 60 millimetre pitch diameter. Keep the unit convention consistent: the numerical result inherits the module’s length unit per tooth. Metric module is conventionally expressed in millimetres, so this tool is intended for module-based gear systems rather than diametral-pitch inputs. Do not enter the circular pitch, outside diameter, or diametral pitch in the module field. Those quantities are related, but substituting one of them directly changes the meaning of the calculation and yields a misleading diameter.
Using the result for gear layouts and meshes
Use the calculated pitch diameter to build the pitch circles in a gearbox layout and to establish nominal shaft spacing. For two external standard spur gears, the theoretical center distance is half the sum of their pitch diameters. For an external gear meshing with an internal gear, the corresponding nominal distance is half the difference, subject to the actual design convention. Mating gears must use the same module, and practical compatibility also depends on pressure angle, tooth form, helix angle, profile shift, backlash, face width, quality, and manufacturing tolerances. This calculator deliberately handles only the basic uncorrected pitch-diameter relationship; it does not determine outside diameter, base diameter, root diameter, undercut risk, working pitch diameter, or modified center distance. Treat the output as a clean layout value and a starting point for meshing calculations, then confirm the full tooth system and any profile modifications against the applicable gear standard or the manufacturer’s data before releasing a production design.
What you can do with it
Lay out gearbox shafts
Calculate each gear's pitch circle before deriving the nominal center distance between parallel shafts.
Check a catalog gear
Confirm that a listed module and tooth count imply the pitch diameter expected in a mechanical drawing.
Compare candidate gear sizes
Evaluate how changing module or tooth count affects the space occupied by a spur gear at the pitch circle.
FAQ
What formula does the calculator use?
It uses pitch diameter = module × number of teeth for a standard module-based spur gear.
What unit is the pitch diameter returned in?
The result uses the length unit represented by the module. With module in millimetres per tooth, pitch diameter is in millimetres.
Is pitch diameter the same as outside diameter?
No. Pitch diameter describes the theoretical rolling circle, while outside diameter is measured across the tooth tips.
Can I use diametral pitch as the module input?
No. Diametral pitch uses a different convention and must be converted to module before using this calculator.
Does this result guarantee that two gears will mesh?
No. Mating gears also need compatible module, pressure angle, tooth form, and other geometry and tolerance choices.
What does an API calculation cost?
Each API request costs $0.002. The browser calculation is available without an API request.
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/eng/gear-pitch-diameter \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"module":2.5,"teeth":24}'const res = await fetch("https://api.kit.forhosting.com/eng/gear-pitch-diameter", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"module": 2.5,
"teeth": 24
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/eng/gear-pitch-diameter",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"module": 2.5,
"teeth": 24
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/eng/gear-pitch-diameter", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"module":2.5,"teeth":24}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"module":2.5,"teeth":24}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/eng/gear-pitch-diameter", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"module": 2.5,
"teeth": 24
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "eng.gear_pitch_diameter",
"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. |