Miller indices calculator
Intercepts of 2, 3 and 4 on the a, b and c axes name the plane (6 4 3). Enter the three intercepts in lattice-constant units, use zero for an axis the plane never meets, and get the smallest whole-number Miller indices. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Intercept a
- 2
- Intercept b
- 3
- Intercept c
- 4
- Reciprocal a
- 0.5
- Reciprocal b
- 0.3333333333
- Reciprocal c
- 0.25
- H
- 6
Miller indices (h k l) are the standard three-integer name of a crystal plane. They come from the intercepts of that plane with the unit-cell a, b, and c axes, measured in units of the corresponding lattice constants. This Miller indices calculator accepts those three intercepts, forms the reciprocal of each finite value, and reduces the ratio to the smallest integers h, k, and l.
What Miller indices mean and how intercepts become (h k l)
The Miller indices of a lattice plane are the three integers h, k, and l such that the plane intercepts the crystallographic axes at a divided by h, b divided by k, and c divided by l, or never meets an axis when the corresponding index is zero. Equivalently, start from the intercepts of the chosen plane with the a, b, and c axes, measured in units of the lattice parameters, take the reciprocal of each finite intercept, and clear fractions until you have the smallest integer triple.
That is the definition William Hallowes Miller introduced in the nineteenth century and the one every materials-science, mineralogy, and solid-state chemistry course still drills. Classic checks: intercepts one, one, one become (1 1 1); intercepts two, three, four become (6 4 3); intercepts one, one, and parallel to c become (1 1 0). Parallel to an axis is an infinite intercept in the textbook picture.
A zero intercept therefore contributes a zero Miller index — the plane never cuts that axis — rather than a division by zero. The three integers are then divided by their greatest common divisor, so (2 2 2) is reported as (1 1 1): those labels name the same family of equally spaced parallel planes. Negative intercepts produce negative indices, written with a minus in the notation string, for a plane that cuts the negative end of that axis.
The engine uses continued-fraction rationals and exact integer LCM and GCD reduction, not a rounded floating guess, so simple fractions such as one-half or two-thirds reduce to the textbook integers every time a student, tutor, or script asks.
Where a Miller indices calculator earns its keep
Crystallography labs and materials courses use a Miller indices calculator so students can check (h k l) for arbitrary intercepts without losing a sign or forgetting to take reciprocals. Exam-prep generators need a deterministic oracle that rejects a non-finite intercept instead of silently returning an empty triple a buggy grader might treat as success. Failed validation does not consume balance.
Keep intercepts inside the documented magnitude limit, pin both the integer triple and the miller string in tests, and you get reproducible (h k l) labels for homework, LMS plugins, and edge workers without standing up a crystallography library of your own. Prefer this capability when the intercepts are already in axial units and you only need the reduced integers; it is not a d-spacing Bragg solver, not a zone-axis [uvw] direction finder, and not a stereographic-projection plotter.
What you can do with it
Classroom and homework checks
Let students submit axial intercepts and verify the reduced (h k l) against the reciprocal-and-clear-fractions method from the textbook.
Diffraction and metallography notebooks
Name cleavage faces, slip planes, and powder-pattern families as integer Miller indices without importing a full crystallographic toolkit.
Exam and LMS auto-grading
Mark miller-indices items with a deterministic oracle that rejects non-finite intercepts and never leaves (222) unreduced.
FAQ
How do I convert intercepts into Miller indices?
Send finite intercepts with the a, b, and c axes.
What happens if an intercept is not a finite number?
Missing values, infinities, and non-numeric strings are not billed.
Are (222) and (111) different?
They name the same family of parallel planes. This calculator divides by the greatest common divisor, so (222) is returned as (111).
How do I enter a plane that is parallel to an axis?
Type zero for that intercept. In the textbook picture a parallel plane meets the axis at infinity, so its reciprocal is zero and that axis gets a Miller index of 0, as in (1 1 0).
What does a negative Miller index mean?
It means the plane cuts the negative end of that axis. A negative intercept gives a negative index, and the result shows it with a minus sign in the notation.
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/chem/miller-indices \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"intercept_a":2,"intercept_b":3,"intercept_c":4}'const res = await fetch("https://api.kit.forhosting.com/chem/miller-indices", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"intercept_a": 2,
"intercept_b": 3,
"intercept_c": 4
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/chem/miller-indices",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"intercept_a": 2,
"intercept_b": 3,
"intercept_c": 4
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/chem/miller-indices", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"intercept_a":2,"intercept_b":3,"intercept_c":4}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"intercept_a":2,"intercept_b":3,"intercept_c":4}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/chem/miller-indices", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"intercept_a": 2,
"intercept_b": 3,
"intercept_c": 4
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "chem.miller_indices",
"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.
Limits
max_abs | 1000000 |
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
A zero intercept means the plane is parallel to that axis and contributes a zero index, which is how classroom forms encode the textbook intercept at infinity when JSON cannot carry an infinite token. Any intercept that is missing or not a finite number fails with invalid_input and is not billed.
What Miller indices mean and how intercepts become (h k l)
This calculator encodes that case as a numeric zero because a JSON body has no infinity token and every miller-indices form field must be a finite number.
Input contract, response shape, and error behaviour
Absolute values larger than one million are rejected so intermediate products stay inside safe integers. If all three intercepts are zero, no unique plane is defined and the task fails rather than inventing (0 0 0). Example: intercepts two, three, and four yield reciprocals one-half, one-third, and one-fourth; clearing denominators gives twelve, eight, and six; dividing by gcd two produces (6 4 3). Failed validation is not billed. POST a JSON body with three required finite numbers: intercept_a, intercept_b, and intercept_c, the intercepts with the a, b, and c axes in units of the lattice constants. Aliases a, intercept_x, and x are accepted for the first axis, b, intercept_y, and y for the second, and c, intercept_z, and z for the third, so spreadsheets and typed forms can reuse the names they already have. Each field may arrive as a JSON number or as a numeric string; missing fields, empty strings, bare signs, non-numeric text, NaN, and infinities fail with invalid_input naming the field, matching the rule that every intercept must be a finite number. On success the body echoes the intercepts, reports the three reciprocals (with a zero intercept mapping to a zero reciprocal), returns integer h, k, and l, a miller string such as (6 4 3), the miller_tuple array, the gcd used to reduce, a formula string, and ordered substitution steps you can paste into a lab notebook. Pair the integers with your own drawing code if you need a cubic cell sketch; this endpoint names the plane and does not emit plots.
Where a Miller indices calculator earns its keep
Diffraction notebooks reduce observed spots and cleavage faces to a plane family before comparing with powder cards or TEM zone-axis maps; a tiny parse API avoids pulling a full crystallographic information framework for a three-number rewrite.
Technical questions
What if the plane is parallel to an axis?
Enter intercept 0 for that axis. That encodes the textbook infinite intercept (JSON cannot carry infinity) and contributes Miller index 0, as in (1 1 0) or (1 0 0).
What does the Miller indices calculator cost?
The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.