Electron configuration calculator
Type an atomic number and get the ground-state electron configuration: iron, Z 26, is 1s² 2s² 2p⁶ 3s² 3p⁶ 4s² 3d⁶, or [Ar] 4s² 3d⁶, with 8 valence electrons. Exceptions such as chromium and copper are applied. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Atomic number
- 26
- Symbol
- Fe
- Configuration
- 1s2 2s2 2p6 3s2 3p6 4s2 3d6
- Configuration condensed
- [Ar] 4s2 3d6
- Valence electrons
- 8
Electron configuration is the address book of an atom: it lists how many electrons occupy each subshell in the ground state, from the tight 1s orbital outward through s, p, d, and f shells. Chemists read those strings to predict bonding patterns, magnetism, spectroscopy lines, and where an element sits in the periodic table. Students learn the Aufbau principle, the n plus ell Madelung order, Hund rules, and the famous exceptions such as chromium and copper that swap an s electron into a half-filled or filled d subshell. This calculator takes a single integer atomic number from one through one hundred eighteen, fills orbitals deterministically, applies a fixed set of accepted ground-state exceptions, and returns both the full spectroscopic configuration and the noble-gas condensed form together with a valence electron count and block label. Out-of-range numbers fail with a clear invalid input error instead of inventing a fake superheavy atom.
How ground-state electron configuration is built from Z
Neutral atoms have exactly Z electrons, where Z is the atomic number. The ground-state configuration is the lowest-energy way to place those electrons into hydrogen-like subshells labeled by principal quantum number n and type s, p, d, or f. Capacity is fixed: s holds two electrons, p six, d ten, and f fourteen.
The default fill order follows the Aufbau or Madelung sequence ordered by increasing n plus ell, then by n: one s, two s, two p, three s, three p, four s, three d, four p, and so on through seven p for the heaviest known elements. After naive filling, a small table of textbook exceptions rewrites occupancy for atoms such as chromium, copper, niobium, molybdenum, ruthenium, rhodium, palladium, silver, and selected lanthanides and actinides where experiment and multiplet structure favor half-filled or filled d or f shells over pure Aufbau.
The engine then formats the full string, subtracts the largest noble-gas core with Z less than the atom to produce condensed notation such as bracket argon space four s two three d six, and classifies the element into s, p, d, or f block for valence counting. Everything is integer arithmetic over a fixed orbital list: no network calls, no random seeds, no wall-clock timestamps, and no model drift. Missing fields, non-integers, NaN, Infinity, and Z outside one through one hundred eighteen fail validation before any orbital is filled.
Where electron configuration lookups show up in real work
General chemistry courses assign endless Aufbau tables, noble-gas condensation drills, and exception lists for chromium and copper; a single trusted oracle that returns full and condensed strings plus valence counts speeds grading, demo setup, and self-study. Inorganic instructors compare d-block valence counts when introducing crystal-field or ligand-field ideas, while physical chemistry labs connect configurations to term symbols and selection rules at a high level. Software that generates flashcards, quiz banks, or printable data sheets can batch Z from one to one hundred eighteen without scraping inconsistent public tables.
Research notebooks sometimes need a quick neutral-atom baseline before exploring ions or excited states in specialized codes; this capability intentionally stops at the neutral ground state so the search intent stays sharp. If you later need ionic configurations, oxidation-state electron counts, spectroscopic term symbols, or molecular orbital diagrams, treat those as separate search intents and landings rather than overloading this atomic ground-state configuration page.
What you can do with it
Homework and exam answer keys
Generate full and noble-gas condensed configurations plus valence counts for any Z from 1 to 118 so teachers and auto-graders share one ground truth.
Periodic-table teaching widgets
Drive interactive element cards that show Aufbau order, exceptions, and valence electrons from a single atomic number input.
FAQ
What formula does this electron configuration calculator use?
It fills subshells by the Aufbau (n+ℓ) order, then applies a fixed table of textbook ground-state exceptions. The response includes the full configuration, noble-gas condensed form, and valence electron count.
What happens if the atomic number is out of range?
Z must be an integer from 1 to 118 inclusive (hydrogen through oganesson). Values outside that range are rejected.
Does it handle ions or excited states?
No. This tool returns the neutral-atom ground-state configuration only. Ionic and excited configurations are out of scope.
How are valence electrons counted?
Main-group elements use electrons in the highest principal shell. Transition and f-block elements use educational ns + d/f rules with filled f¹⁴ treated as core-like for late d metals.
What does it 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/chem/electron-configuration \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"atomic_number":26}'const res = await fetch("https://api.kit.forhosting.com/chem/electron-configuration", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"atomic_number": 26
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/chem/electron-configuration",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"atomic_number": 26
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/chem/electron-configuration", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"atomic_number":26}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"atomic_number":26}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/chem/electron-configuration", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"atomic_number": 26
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "chem.electron_configuration",
"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
How ground-state electron configuration is built from Z
Identical atomic numbers always produce identical JSON.
What you send and what you get back
The value must be a whole number from one to one hundred eighteen inclusive, covering hydrogen through oganesson. Classic checks include carbon Z equals six for one s two two s two two p two with four valence electrons, iron Z equals twenty-six for the argon-core four s two three d six pattern with eight valence electrons, chlorine Z equals seventeen with seven valence electrons, and chromium Z equals twenty-four where the exception yields four s one three d five. Send one required integer field named atomic_number. Aliases z and Z are accepted for convenience. On success the response echoes the cleaned atomic number and IUPAC element symbol, reports configuration as the full spectroscopic list of occupied subshells, reports configuration_condensed with the noble-gas core in brackets, and reports valence_electrons using educational rules: main-group elements count electrons in the highest principal shell, while transition and inner-transition metals count valence s together with partially filled d or f contributions, treating a completed f fourteen shell as core-like for late sixth-period d metals. You also receive block, noble_gas_core, a structured subshells array with orbital label, n, type, and electron count, a boolean exception_applied when a ground-state exception overrode pure Aufbau, plus formula and method strings for audits and teaching slides. Pricing for successful API calls is the published base of $0.002 per item; validation failures do not consume prepaid balance.
Where electron configuration lookups show up in real work
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.
Integration use cases
Bulk quiz and flashcard pipelines
Batch neutral-atom configurations for study decks and regression fixtures without scraping inconsistent public tables.