ForHosting KIT · Science

Stoichiometric air-fuel ratio calculator

Methane, with one carbon and four hydrogen atoms, needs about 17 kg of dry air per kg of fuel to burn completely. Enter the atom counts of any CxHy fuel to get the air-fuel mass ratio, the oxygen it demands and the CO2 and water formed. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
Carbon
1
Hydrogen
4
You get
Fuel formula
CH4
Fuel molar mass
16.04246
Moles o2
2
Moles air
9.5238095238

The stoichiometric air-to-fuel mass ratio is the exact kilograms of dry air needed to burn one kilogram of fuel with no leftover oxygen and no leftover fuel. For a hydrocarbon formula unit CxHy, complete combustion fixes the oxygen demand at C plus H over four moles of O2 per mole of fuel; dry air supplies that oxygen at about twenty-one percent by volume, so the air moles scale by one over zero point two one and convert to mass with the mean molar mass of air. Dividing air mass by fuel molar mass yields the classical AFR engineers quote as about seventeen for methane and about fifteen for typical gasoline surrogates. Students meet the derivation in combustion and thermo courses, engine calibrators use it as the lambda-equals-one anchor, and process models need a closed form free of empirical maps. This calculator accepts non-negative carbon and hydrogen atom counts, applies fixed conventional atomic weights and dry-air constants, rejects the undefined case when both counts are zero, and returns the air-fuel mass ratio together with oxygen demand, product moles, fuel formula, and the defining method label.

How carbon and hydrogen counts become a stoichiometric AFR

Start from a pure hydrocarbon written as CxHy, where C is the carbon atom count and H is the hydrogen atom count of one formula unit of fuel. Complete combustion in oxygen follows CxHy plus n_O2 of O2 goes to C of CO2 plus H over two of H2O, with the oxygen balance forcing n_O2 equals C plus H over four. That single scalar is the stoichiometric oxygen demand per mole of fuel.

Real engines and burners do not feed pure oxygen; they feed dry air that is approximately twenty-one percent O2 by volume and therefore about four point seven six moles of air for every mole of O2. Multiplying n_O2 by that air factor and by the conventional mean molar mass of dry air, typically twenty-eight point nine seven grams per mole, produces the mass of air required per mole of fuel.

The fuel mass per mole is C times the atomic mass of carbon plus H times the atomic mass of hydrogen, using the same fixed conventional weights as other KIT chemistry calculators so classroom goldens stay aligned. The stoichiometric air-to-fuel mass ratio is then mass of air divided by mass of fuel; the reciprocal fuel-to-air ratio and the pure oxygen-to-fuel mass ratio are reported alongside for convenience.

Lambda and the equivalence ratio are both one by definition at stoichiometry, because the calculator targets complete combustion with no excess air and no fuel-rich leftover. Negative atom counts are rejected immediately because a chemical formula cannot carry fewer than zero atoms of an element. Fractional counts are allowed when you model an average formula unit for a blend, for example a gasoline surrogate near C8H15, as long as at least one element contributes positive mass.

Where stoichiometric AFR calculators show up in real work

Secondary-school and university combustion courses assign stoichiometric air-fuel ratio drills after balancing CxHy plus oxygen reactions, asking students to convert atom counts into a mass ratio and to compare methane near seventeen against heavier alkanes nearer fifteen. Automotive and aerospace labs use the stoichiometric AFR as the lambda-equals-one reference when calibrating oxygen sensors, setting idle maps, or checking that a surrogate fuel formula produces a plausible air demand before dyno time.

Process and energy engineers sizing burners, boilers, or gas turbines often start from a design fuel formula and need a fast closed-form air mass before introducing humidity, flue-gas recirculation, or multi-component blend tables. If you later need mole-ratio stoichiometry between arbitrary reactants, combustion analysis from CO2 and H2O product masses, or fuel-economy unit conversion, treat those as separate search intents and landings rather than overloading this stoichiometric air-fuel ratio calculator page.

Homework and exam answer keys

Convert CxHy atom counts into a single stoichiometric AFR so teachers and auto-graders share one combustion ground truth for methane, octane, and surrogates.

Engine and burner design checks

Anchor lambda-one air demand from a design fuel formula before applying excess-air factors, humidity, or multi-component blend maps.

What is the stoichiometric air-fuel ratio?

It is the mass of dry air required for complete combustion of a unit mass of fuel with neither excess oxygen nor leftover fuel. For hydrocarbons it follows from n_O2 = C + H/4 and air at about 21% O2 by volume.

How does this stoichiometric AFR calculator work?

It sets n_O2 = carbon + hydrogen/4, scales to moles of dry air with 1/0.21, multiplies by M_air, divides by the fuel molar mass C×M_C + H×M_H, and returns the mass AFR with intermediate oxygen and product moles.

What happens if both carbon and hydrogen are zero?

With no fuel atoms the molar mass is zero and the air-fuel ratio is undefined, so no number is returned.

Can I model pure hydrogen or pure carbon?

Yes. Set carbon to 0 and hydrogen to 2 for H2, or carbon to 1 and hydrogen to 0 for pure carbon. Exactly one of the two counts may be zero; both zero is rejected.

What does it cost?

The browser tool is free and runs locally.

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.

POSThttps://api.kit.forhosting.com/chem/stoichiometric-air-fuel-ratio

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.

curl -X POST https://api.kit.forhosting.com/chem/stoichiometric-air-fuel-ratio \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"carbon":1,"hydrogen":4}'
{
  "carbon": 1,
  "hydrogen": 4
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "chem.stoichiometric_air_fuel_ratio",
  "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.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

How carbon and hydrogen counts become a stoichiometric AFR

The pipeline is pure deterministic floating-point arithmetic: no random seeds, no wall-clock timestamps, no network fetches of live air-composition tables, and no model drift, so identical carbon and hydrogen counts always produce identical JSON. When both carbon and hydrogen are zero there is no fuel mass and the ratio is undefined, so the request fails with invalid_input rather than inventing infinity or a zero denominator.

What you send and what you get back

Send two required fields: carbon and hydrogen, each a finite non-negative number of atoms in the fuel formula unit CxHy. Classic examples are carbon one and hydrogen four for methane CH4, carbon eight and hydrogen eighteen for octane C8H18, carbon zero and hydrogen two for pure hydrogen, or carbon one and hydrogen zero for pure carbon. Both fields may be plain JSON numbers or numeric strings that parse to finite values. Missing fields, empty strings, non-numeric values, NaN, Infinity, negative counts, and the pair both equal to zero fail with invalid_input and are not charged. On success the response echoes the cleaned carbon and hydrogen counts, a fuel_formula string such as CH4 or C8H18, fuel_molar_mass in grams per mole, moles_o2 and moles_air per mole of fuel, moles_co2 and moles_h2o of products, mass_air_per_mole_fuel and mass_o2_per_mole_fuel, the primary air_fuel_mass_ratio, the reciprocal fuel_air_mass_ratio, oxygen_fuel_mass_ratio, lambda and equivalence_ratio both set to one, a units object, constants_used documenting M_C, M_H, M_O2, M_air, and the O2 volume fraction, method set to stoichiometric_air_fuel_mass_ratio, a formula string of the closed form, and a reaction summary for complete combustion in dry air. Pricing for successful API calls is the published base of $0.002 per item; validation failures do not consume prepaid balance. This capability stops at the stoichiometric mass ratio for a hydrocarbon formula unit; lean or rich operating points need a separate excess-air or lambda calculator, and oxygenated fuels with nitrogen heteroatoms are out of scope for this CxHy landing.

Where stoichiometric AFR calculators 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.

Curriculum and simulator fixtures

Generate stable JSON fixtures for thermo lessons and engine simulators that need deterministic AFR without non-determinism or network tables.

Read the full KIT documentation →