ForHosting KIT · Science

Combustion reaction calculator

Type the carbon and hydrogen counts of a hydrocarbon and get its balanced complete-combustion equation: 3 carbons and 8 hydrogens give C3H8 + 5 O2 → 3 CO2 + 4 H2O. Half coefficients are cleared to whole numbers. 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
Carbons
3
Hydrogens
8
You get
Formula label
C3H8
Oxygen needed
5
Carbon dioxide
3
Water
4

This complete combustion reaction calculator converts the carbon and hydrogen atom counts of a hydrocarbon written CxHy into the oxygen the burn consumes and the carbon dioxide and water it produces. You supply two positive integers: carbons x and hydrogens y. The engine applies the standard complete-combustion identity CxHy plus (x plus y over four) molecules of O2 yield x molecules of CO2 and (y over two) molecules of H2O, then scales that identity to the lowest whole-number coefficients so the balanced equation is ready to copy into a worksheet. Classic classroom checks include methane CH4 needing two O2 and producing one CO2 and two H2O, propane C3H8 needing five O2, and benzene C6H6 whose half-integer oxygen coefficient becomes two C6H6 plus fifteen O2.

What complete combustion of a hydrocarbon means

Complete combustion of a hydrocarbon CxHy is the reaction that converts every carbon atom into carbon dioxide and every hydrogen atom into water, with molecular oxygen as the only oxidizer. Atom balance on carbon immediately gives x molecules of CO2 per molecule of fuel. Atom balance on hydrogen gives y over two molecules of H2O, because each water molecule carries two hydrogen atoms.

Oxygen atoms on the product side then total 2x from carbon dioxide plus y over two from water, so the O2 molecules required on the reactant side are x plus y over four. When y is a multiple of four, every coefficient is already an integer per mole of fuel, as in methane CH4 (two O2, one CO2, two H2O) and propane C3H8 (five O2, three CO2, four H2O).

When y is even but not a multiple of four, the oxygen coefficient is a half-integer, as in ethane C2H6 needing 3.5 O2 or benzene C6H6 needing 7.5 O2. The calculator then multiplies the whole equation by two or four, whichever is smaller, and reduces by the greatest common divisor so you get the lowest integer balanced equation used in textbooks, for example two C6H6 plus fifteen O2 going to twelve CO2 and six H2O.

Where a combustion reaction calculator earns its keep

Classrooms and tutoring platforms use a combustion reaction calculator so learners can check the balanced equation for arbitrary CxHy without flipping oxygen-count errors by hand. Exam-prep generators need a deterministic oracle that marks wrong the case of a zero or fractional atom count instead of silently emitting a half-balanced sketch that a buggy grader might treat as success.

Lab notebooks and protocol writers need the integer form of benzene or octane combustion before they discuss excess air, bomb calorimetry, or flue-gas analysis, and copying C8H18 plus 12.5 O2 is less useful on a whiteboard than two C8H18 plus twenty-five O2. Developers call the same contract from scripts to seed deterministic test vectors for chemistry tutors, to normalize user-entered formulas before a lab export, or to satisfy programming-challenge statements that demand O2, CO2, and H2O coefficients rather than a hand-waved sketch. Failed validation does not consume balance.

Classroom and homework checks

Let students submit carbon and hydrogen atom counts for CxHy and verify O2 needed, CO2, H2O, and the lowest-integer balanced equation against textbook methods.

Exam and LMS auto-grading

Mark complete-combustion items with a deterministic oracle that rejects non-positive or non-integer atom counts and never invents extra products.

How do I compute the complete combustion of a hydrocarbon?

Send positive integers carbons (x) and hydrogens (y).

What happens if an atom count is zero, negative, or not an integer?

Every atom count must be a positive integer; those failures are not billed.

Why is benzene returned as 2 C6H6 + 15 O2 instead of C6H6 + 7.5 O2?

Per formula unit the oxygen coefficient is 7.5. The calculator also reports the lowest whole-number coefficients used in textbooks, obtained by multiplying by two (or four) and reducing by the GCD.

Does this tool take moles of fuel or convert to air volume?

No. It balances the complete combustion reaction from carbon and hydrogen atom counts only.

Can I balance the combustion of ethanol or another fuel that contains oxygen?

No. The calculator only handles hydrocarbons made of carbon and hydrogen alone. Fuels that already contain oxygen, such as alcohols, or that contain nitrogen or sulfur, are outside what it balances.

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/combustion-reaction

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/combustion-reaction \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"carbons":3,"hydrogens":8}'
{
  "carbons": 3,
  "hydrogens": 8
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "chem.combustion_reaction",
  "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.

max_atom_count1000000
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.

Missing, zero, negative, or non-integer atom counts fail with invalid_input and are not billed.

What complete combustion of CxHy means and what the response contains

That closed form is the entire stoichiometry of complete combustion for a hydrocarbon that contains only carbon and hydrogen: no nitrogen, no sulfur, no oxygen already in the fuel, and no leftover carbon monoxide. Incomplete combustion, air as a mixture, heats of combustion, and oxygenates such as alcohols are out of scope: this page reports only the stoichiometric complete-combustion reaction for CxHy, returning oxygen_needed, carbon_dioxide, and water per formula unit together with the integer coefficients and a balanced_equation string you can paste into notes, tests, or a teaching slide.

Input contract, integer balancing, and error behaviour

Zero is not a positive integer, so pure carbon or pure hydrogen is rejected rather than treated as a special fuel. Atom counts above the documented ceiling of one million are also rejected so a pasted spreadsheet cell cannot explode a formula string. Integer balancing chooses the smallest multiplier among one, two, and four that makes the oxygen and water coefficients whole, then divides all four coefficients by their greatest common divisor. POST a JSON body with two required positive integers: carbons, the carbon atom count x in CxHy, and hydrogens, the hydrogen atom count y. Each field may arrive as a JSON integer or as a digit string; aliases C, carbon, carbon_atoms, and x are accepted for carbons, and aliases H, hydrogen, hydrogen_atoms, and y are accepted for hydrogens. Negative counts, fractions such as 1.5, empty strings, scientific notation, and missing fields all fail with invalid_input naming the field, and those failures are not billed. On success the body echoes carbons and hydrogens, a compact formula_label that omits a coefficient of one (CH4, not C1H4), the per-formula-unit amounts oxygen_needed, carbon_dioxide, and water, the lowest-integer fuel_coefficient, oxygen_coefficient, carbon_dioxide_coefficient, and water_coefficient, a balanced_equation string such as C3H8 plus five O2 going to three CO2 plus four H2O, plus method and formula reminders. Pair the free browser run on this page with the priced API when you need the identical mathematical result inside an automated pipeline without re-implementing x plus y over four yourself. There is no moles-of-fuel field, no mass conversion, and no air-volume path: if you already know how many moles of propane you have, multiply the per-formula-unit oxygen_needed by that amount in your own layer, or use a dedicated oxygen-moles helper.

Where a combustion reaction calculator earns its keep

Keep requests small, pin the balanced_equation string in tests, and you get reproducible complete-combustion stoichiometry for homework, LMS plugins, and edge workers without standing up a general equation balancer. This page is not an oxygen-for-a-given-fuel-amount tool, not an empirical-formula combustion-analysis helper, and not an air-fuel mass-ratio calculator: those are separate search intents with their own landings. Use this endpoint when the question is the complete combustion reaction of CxHy from its carbon and hydrogen atom counts.

Notebooks and test fixtures

Generate reproducible oxygen, carbon dioxide, and water coefficients for unit tests, chemistry tutors, and CI assertions on hydrocarbon combustion.

What does the combustion reaction calculator cost?

The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.

Read the full KIT documentation →