Combustion analysis calculator
Turn the products of a combustion train into an empirical formula: 3.52 g of CO2 and 1.44 g of H2O point to CH2. The calculator works out the moles of carbon and hydrogen and reduces them to the simplest whole-number ratio. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Mass of carbon dioxide
- 3.52
- Mass of water
- 1.44
- Moles co2
- 0.079982731
- Moles h2o
- 0.0799321465
- Moles c
- 0.079982731
- Moles h
- 0.159864293
Combustion analysis is the classical laboratory route from a pure hydrocarbon sample to its empirical formula. When the sample burns completely in excess oxygen, every carbon atom leaves as carbon dioxide and every hydrogen atom leaves as water. Weighing those two products gives moles of carbon equal to moles of CO2 and moles of hydrogen equal to twice the moles of H2O. Dividing both mole counts by the smaller value and scaling to the nearest whole-number pair recovers the simplest ratio CxHy that textbooks call the empirical formula. Students meet this workflow after percent composition, before molecular-formula scaling by molar mass, and again whenever an organic unknown is identified from a combustion train. This calculator accepts the CO2 and H2O masses in grams, applies fixed conventional atomic weights, rejects negative or non-positive product masses with a clear validation error, and returns the empirical formula string together with intermediate moles, element masses, ratio diagnostics, and the defining method label.
How CO2 and H2O masses become a hydrocarbon empirical formula
Start from a complete-combustion experiment on a pure hydrocarbon written generically as CxHy. Every carbon atom in the sample exits as one molecule of carbon dioxide, so the moles of carbon equal the mass of CO2 divided by the molar mass of CO2. Every pair of hydrogen atoms exits as one molecule of water, so the moles of hydrogen equal twice the mass of H2O divided by the molar mass of H2O.
Those two mole amounts already encode the atomic ratio: divide both by the smaller of the two, then multiply by successive small integers until both scaled values sit within a tight absolute tolerance of whole numbers. Finally reduce that integer pair by their greatest common divisor so the empirical formula is the simplest ratio, for example CH4 rather than C2H8, or C2H5 rather than C4H10 when the data support a half-multiple that clears on the next multiplier.
Fixed conventional atomic weights for C, H, and O keep the arithmetic identical to common textbook tables and to sibling KIT chemistry calculators. Negative product masses are rejected immediately because a physical combustion train cannot report less than zero grams of CO2 or H2O; zero product masses are also rejected because a hydrocarbon empirical formula requires both carbon and hydrogen atoms.
Where combustion analysis calculators show up in real work
Secondary-school and introductory university chemistry courses assign combustion-analysis drills after percent composition, asking students to convert CO2 and H2O masses into CxHy and then optionally scale to a molecular formula with a separate molar-mass measurement. Laboratory teaching assistants grade organic unknowns where students run a combustion train, weigh the absorbents, and must report a defensible empirical ratio before claiming identity. Process and analytical chemists sometimes re-check supplier certificates or lab notebooks that list only product masses and need a fast whole-number gate before accepting a hydrocarbon formula claim.
If you later need molecular formula from empirical formula and molar mass, percent composition without combustion products, or oxygenated-organic combustion with three elements, treat those as separate search intents and landings rather than overloading this combustion analysis empirical formula calculator page.
What you can do with it
Homework and exam answer keys
Convert CO2 and H2O product masses into a single empirical formula string so teachers and auto-graders share one combustion-analysis ground truth.
Lab combustion-train checks
Verify that weighed absorbents from a student unknown reduce to a sensible CxHy ratio before the molecular-mass step.
FAQ
What is combustion analysis for a hydrocarbon?
Complete combustion converts every carbon atom to CO2 and every hydrogen atom to H2O. From the product masses you compute moles of C and H and reduce them to the simplest whole-number empirical formula CxHy.
What happens if a product mass is negative?
Negative CO2 or H2O masses are not physical for a combustion train, so no empirical formula is returned.
Does this return the molecular formula?
No. It returns the empirical (simplest ratio) formula only. To scale to a molecular formula you need a separate molar-mass measurement and a molecular-formula calculator.
What does it cost?
The browser tool is free and runs locally.
What if the carbon-to-hydrogen ratio does not come out as whole numbers?
The calculator stops with an error instead of inventing a fractional formula. That usually means one of the weighed product masses is off, so recheck your measurements of carbon dioxide and water.
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/combustion-analysis \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"co2_mass":3.52,"h2o_mass":1.44}'const res = await fetch("https://api.kit.forhosting.com/chem/combustion-analysis", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"co2_mass": 3.52,
"h2o_mass": 1.44
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/chem/combustion-analysis",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"co2_mass": 3.52,
"h2o_mass": 1.44
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/chem/combustion-analysis", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"co2_mass":3.52,"h2o_mass":1.44}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"co2_mass":3.52,"h2o_mass":1.44}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/chem/combustion-analysis", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"co2_mass": 3.52,
"h2o_mass": 1.44
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "chem.combustion_analysis",
"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 CO2 and H2O masses become a hydrocarbon empirical formula
The pipeline is pure deterministic floating-point math: no random seeds, no wall-clock timestamps, no network lookups of live atomic-weight tables, and no model drift, so identical product masses always produce identical JSON. When the scaled ratio never lands near integers within the configured multiplier limit, the request fails with invalid_input so callers recheck the weighed products instead of inventing a fractional formula.
What you send and what you get back
Classic classroom checks include product masses that recover methane CH4, ethane C2H6, and alkene ratios such as CH2. Send two required fields: co2_mass and h2o_mass, each a finite positive number of grams of product collected after combustion. 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 masses, and zero masses fail with invalid_input and are not charged. On success the response echoes the cleaned co2_mass and h2o_mass, moles_co2 and moles_h2o, moles_c and moles_h, mass_c and mass_h of carbon and hydrogen accounted for in the products, a relative_ratio object with C and H after division by the smaller mole amount, the ratio_multiplier used to reach integers, carbon_atoms and hydrogen_atoms of the reduced formula, the empirical_formula string such as CH2 or C3H8, an elements map, a units object labeling grams and moles, molar_masses_used for CO2, H2O, C, and H, method set to combustion_product_masses_to_empirical, and a formula string documenting moles_C equals m_CO2 over M_CO2 and moles_H equals two times m_H2O over M_H2O. 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 empirical formula; if you already have the empirical string and a molecular molar mass, use the molecular-formula scaling tools instead of overloading combustion product fields.
Where combustion analysis 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.
Integration use cases
Curriculum and LMS fixtures
Generate stable JSON fixtures for interactive lessons that teach hydrocarbon empirical formulas from product masses without non-determinism.
Technical questions
How does this combustion analysis calculator work?
It sets moles_C = co2_mass / M_CO2 and moles_H = 2 × (h2o_mass / M_H2O), scales that ratio to the nearest whole numbers within a small tolerance, reduces by GCD, and returns the empirical formula string.