NASA polynomial calculator: cp, enthalpy and entropy
Pick one of the 53 species in the GRI-Mech 3.0 thermo file, or paste any NASA 7-coefficient entry, enter a temperature, and get cp, H, S and G per mole and per kg, which coefficient set applies and whether you are still inside the fitted range. Then check the numbers your own MATLAB or Python parser printed. Free, no sign-up, runs in your browser.
GRI-Mech 3.0 thermo30.dat · checked against NIST-JANAF · Updated 20 Nov 2026
O2: 200-3500 K, common temperature 1000 K, molar mass 31.998 g/mol.
R = 8.314462618 J/(mol·K). H is absolute (includes the heat of formation), so H(298.15 K) is the heat of formation. Dots on the chart are NIST-JANAF values (7 common species).
- Inside the fitted range; high-temperature set (coefficients 1-7).
- Dimensionless: cp/R 4.19546, H/RT 2.73100, S/R 29.29671.
- H(298.15 K) = 0.000 kJ/mol (heat of formation); H − H(298.15 K) = 22.707 kJ/mol.
Check my numbers
Type one value your code printed for the species and temperature chosen above. The checker compares it with the right answer and with the mistakes seen in published reports of this project.
- Your 183.944 matches a known mistake: the first term of H/RT is a₁, not a₁·ln T (that term belongs to the entropy formula). The right value is 22.707 kJ/mol.
What are the NASA 7-coefficient polynomials?
They are curve fits that give the ideal-gas specific heat, enthalpy and entropy of a species at any temperature from 14 numbers: seven for the low-temperature range and seven for the high one. They come from NASA's thermochemical work (Gordon and McBride) and are the format CHEMKIN, Cantera and OpenFOAM read. Specific heat is a quartic in temperature; enthalpy and entropy are its integrals, with a6 and a7 as the integration constants.
Use coefficients 1-7 (the high-temperature set, printed first) above the species' common temperature and 8-14 (the low set) below it. The two sets are fitted to meet there: across all 53 GRI-Mech species the largest jump in cp at the switch is 0.0008 J/(mol·K), for C3H7.
How do you read a NASA thermo.dat file?
By fixed columns, not by splitting on spaces. Each species takes four 80-character lines, numbered 1 to 4 in column 80. Here is O2 from GRI-Mech 3.0:
O2 TPIS89O 2 G 200.000 3500.000 1000.000 1
3.28253784E+00 1.48308754E-03-7.57966669E-07 2.09470555E-10-2.16717794E-14 2
-1.08845772E+03 5.45323129E+00 3.78245636E+00-2.99673416E-03 9.84730201E-06 3
-9.68129509E-09 3.24372837E-12-1.06394356E+03 3.65767573E+00 4| Line | Columns | What it holds |
|---|---|---|
| 1 | 1-18 | Species name (O2) |
| 1 | 25-44 | Up to four elements, 2 characters each plus a 3-character count (O, 2): use these for the molar mass |
| 1 | 46-55, 56-65, 66-73 | Low, high and common temperature (200, 3,500, 1,000 K) |
| 2 | 1-75 | a1-a5 of the high-temperature set, 15 characters each |
| 3 | 1-75 | a6, a7 (high), then a1-a3 of the low set |
| 4 | 1-60 | a4-a7 of the low set |
Splitting on spaces fails because negative numbers have no space before them: line 2 of O2 holds 1.48308754E-03-7.57966669E-07 as two numbers. That is why most working codes look for each "E" and cut 4 characters after it, which is the same as cutting every 15 characters.
Worked example: O2 at 1,000 K
At exactly 1,000 K the GRI-Mech file uses the high set (T is not below the common temperature; the two sets agree there anyway). Putting T = 1,000 into the three formulas:
NIST-JANAF gives 34.870 J/(mol·K), 22.703 kJ/mol and 243.578 J/(mol·K), so the polynomial is within 0.037% in cp. Per kg, divide by the molar mass from the element columns:
How accurate are the GRI-Mech 3.0 polynomials against NIST-JANAF?
From 298 to 1,000 K, very: O2, N2, H2, H2O, CO and CO2 are all within 0.20% of NIST-JANAF in cp. Higher up, water drifts to 2.1% at 3,500 K and methane to 11.9%. That is a difference between databases, not a fit error: Cantera's NASA data for methane matches GRI-Mech within 0.44% from 500 to 3,500 K. If your solver uses GRI-Mech kinetics, use its thermo file.
| Species | T (K) | cp GRI | cp JANAF | Δ cp | H GRI (kJ/mol) | H JANAF |
|---|---|---|---|---|---|---|
| O2 200-3,500 K | 298.15 | 29.38 | 29.38 | +0.01% | 0.00 | 0.00 |
| 1,000 | 34.88 | 34.87 | +0.04% | 22.71 | 22.70 | |
| 3,000 | 40.00 | 39.86 | +0.33% | 98.11 | 98.01 | |
| N2 300-5,000 K | 298.15 | 29.07 | 29.12 | −0.18% | 0.00 | 0.00 |
| 1,000 | 32.76 | 32.70 | +0.20% | 21.47 | 21.46 | |
| 3,000 | 37.03 | 37.03 | 0.00% | 92.73 | 92.72 | |
| H2O 200-3,500 K | 298.15 | 33.59 | 33.59 | −0.01% | -241.82 | -241.83 |
| 1,000 | 41.29 | 41.27 | +0.06% | -215.82 | -215.83 | |
| 3,000 | 56.79 | 55.75 | +1.87% | -114.16 | -115.28 | |
| CO2 200-3,500 K | 298.15 | 37.14 | 37.13 | +0.02% | -393.51 | -393.52 |
| 1,000 | 54.32 | 54.31 | +0.02% | -360.11 | -360.13 | |
| 3,000 | 62.17 | 62.23 | −0.09% | -240.70 | -240.67 | |
| CH4 200-3,500 K | 298.15 | 35.69 | 35.64 | +0.15% | -74.60 | -74.87 |
| 1,000 | 73.62 | 71.80 | +2.54% | -35.95 | -36.69 | |
| 3,000 | 111.61 | 101.39 | +10.08% | 159.94 | 147.20 |
cp in J/(mol·K). JANAF absolute H = ΔfH(298.15 K) + [H − H(298.15 K)] from the same table.
What goes wrong when students parse the NASA file?
Skill-Lync read 39 of the 2,084 public reports of this project (MATLAB for Mechanical Engineers, project 1) on 20 Nov 2026. Most parsers work; these are the mistakes that change the numbers, worked out on the real file:
- Running past the fitted range. The file's second line says 300 / 1,000 / 5,000 K, and 11 of the 30 reports that show their temperature vector use one range for every species, read from that line or typed in (up to 4,000, 5,000 or 6,000 K). But 30 of the 53 species stop below 5,000 K (27 at 3,500 K). Extrapolated to 5,000 K, cp is off by −14.5% for O2, −15.7% for CO2, +14.8% for H2O and +15.0% for H2 against NIST-JANAF. Plot each species over its own range.
- Switching at 1,000 K for every species. 10 of the 39 reports refer only to the global middle temperature. Three species switch elsewhere: HNCO at 1,478 K, HCNO at 1,382 K and HOCN at 1,368 K. Using the high set from 1,000 K puts their cp up to 1.6% high.
- The ln T term in the wrong formula. One report wrote H with a1·ln T, copied from the entropy line: O2 at 1,000 K comes out 183.9 kJ/mol instead of 22.707. Another left the T out of H = R·T·(...), which gives H/T.
- Molar mass from the name. Reading the name letter by letter cannot see two-letter symbols (argon, AR, comes out as zero) or names like CH2(S). The element columns hold the counts. One report also typed carbon as 12.001 instead of 12.011.
- Absolute versus sensible enthalpy. CO2 has H = -360.11 kJ/mol at 1,000 K, negative because it includes the heat of formation (-393.51 kJ/mol). That is correct; it is not a sign error.
The check my numbers panel recognises each of these from the value alone, plus log10 for ln, missing a6 or a7, per-mole versus per-kg and J versus kJ.
cp, H and S of all 53 GRI-Mech 3.0 species at 298.15 K and 1,000 K
Computed from the GRI-Mech 3.0 thermo file with R = 8.314462618 J/(mol·K). Species fitted from 300 K have no 298.15 K row (it would be a 2 K extrapolation; the calculator above will still give it, with a warning).
| Species | M (g/mol) | Range (K) | cp 298 | H 298 (kJ/mol) | S 298 | cp 1000 | H 1000 | S 1000 |
|---|---|---|---|---|---|---|---|---|
| O | 15.999 | 200-3,500 | 21.91 | 249.17 | 161.06 | 20.92 | 264.03 | 186.79 |
| O2 | 31.998 | 200-3,500 | 29.38 | 0.00 | 205.15 | 34.88 | 22.71 | 243.59 |
| H | 1.008 | 200-3,500 | 20.79 | 218.00 | 114.72 | 20.79 | 232.59 | 139.87 |
| H2 | 2.016 | 200-3,500 | 28.84 | 0.00 | 130.68 | 30.16 | 20.69 | 166.24 |
| OH | 17.007 | 200-3,500 | 29.89 | 39.35 | 183.74 | 30.69 | 60.27 | 219.73 |
| H2O | 18.015 | 200-3,500 | 33.59 | -241.82 | 188.83 | 41.29 | -215.82 | 232.74 |
| HO2 | 33.006 | 200-3,500 | 34.89 | 12.55 | 229.10 | 47.62 | 42.11 | 278.48 |
| H2O2 | 34.014 | 200-3,500 | 42.39 | -135.88 | 234.53 | 62.48 | -98.02 | 297.33 |
| C | 12.011 | 200-3,500 | 20.84 | 716.68 | 158.10 | 20.79 | 731.28 | 183.28 |
| CH | 13.019 | 200-3,500 | 29.17 | 597.33 | 183.04 | 32.27 | 618.56 | 219.27 |
| CH2 | 14.027 | 200-3,500 | 35.01 | 392.33 | 194.42 | 44.59 | 420.36 | 241.61 |
| CH2(S) CH2 | 14.027 | 200-3,500 | 33.78 | 429.89 | 189.22 | 44.23 | 457.07 | 234.80 |
| CH3 | 15.035 | 200-3,500 | 38.42 | 146.90 | 194.01 | 58.93 | 181.46 | 251.12 |
| CH4 | 16.043 | 200-3,500 | 35.69 | -74.60 | 186.37 | 73.62 | -35.95 | 248.28 |
| CO | 28.010 | 200-3,500 | 29.14 | -110.53 | 197.66 | 33.16 | -88.84 | 234.54 |
| CO2 | 44.009 | 200-3,500 | 37.14 | -393.51 | 213.79 | 54.32 | -360.11 | 269.29 |
| HCO | 29.018 | 200-3,500 | 34.59 | 42.00 | 224.33 | 48.06 | 71.26 | 273.09 |
| CH2O H2CO | 30.026 | 200-3,500 | 35.39 | -108.58 | 218.76 | 61.99 | -73.79 | 275.38 |
| CH2OH CH3O | 31.034 | 200-3,500 | 48.37 | -14.63 | 243.92 | 77.41 | 30.82 | 318.73 |
| CH3O | 31.034 | 300-3,000 | – | – | – | 77.82 | 58.56 | 296.38 |
| CH3OH CH4O | 32.042 | 200-3,500 | 44.04 | -200.94 | 239.81 | 89.66 | -152.47 | 317.68 |
| C2H | 25.030 | 200-3,500 | 42.00 | 566.20 | 213.34 | 52.95 | 599.68 | 269.79 |
| C2H2 | 26.038 | 200-3,500 | 44.00 | 228.20 | 200.92 | 67.91 | 269.25 | 268.91 |
| C2H3 | 27.046 | 200-3,500 | 42.71 | 299.74 | 233.89 | 79.80 | 344.81 | 307.08 |
| C2H4 | 28.054 | 200-3,500 | 42.89 | 52.50 | 219.32 | 94.10 | 103.14 | 300.32 |
| C2H5 | 29.062 | 200-3,500 | 50.48 | 118.66 | 247.12 | 107.86 | 176.75 | 340.21 |
| C2H6 | 30.070 | 200-3,500 | 52.50 | -83.85 | 229.22 | 122.69 | -19.44 | 331.60 |
| CH2CO C2H2O | 42.037 | 200-3,500 | 51.74 | -47.70 | 241.89 | 84.72 | 2.39 | 324.28 |
| HCCO HC2O | 41.029 | 300-4,000 | – | – | – | 69.73 | 220.62 | 318.67 |
| HCCOH C2OH2 | 42.037 | 300-5,000 | – | – | – | 87.89 | 131.67 | 324.02 |
| H2CN | 28.034 | 300-4,000 | – | – | – | 64.52 | 284.70 | 285.37 |
| HCN | 27.026 | 200-6,000 | 35.86 | 130.82 | 201.82 | 50.23 | 161.87 | 253.66 |
| HNO | 31.014 | 200-6,000 | 33.88 | 106.26 | 220.92 | 47.77 | 134.94 | 268.62 |
| N | 14.007 | 200-6,000 | 20.79 | 472.68 | 153.30 | 20.79 | 487.27 | 178.46 |
| NNH N2H | 29.022 | 200-6,000 | 34.66 | 249.52 | 224.50 | 48.02 | 279.00 | 273.67 |
| N2O | 44.013 | 200-6,000 | 38.63 | 81.60 | 220.01 | 55.22 | 115.81 | 276.98 |
| NH | 15.015 | 200-6,000 | 29.19 | 356.92 | 181.22 | 31.28 | 377.86 | 217.11 |
| NH2 | 16.023 | 200-6,000 | 33.86 | 192.05 | 194.99 | 43.54 | 218.93 | 240.17 |
| NH3 | 17.031 | 200-6,000 | 35.65 | -45.90 | 192.77 | 56.53 | -13.27 | 246.47 |
| NO | 30.006 | 200-6,000 | 29.86 | 91.26 | 210.74 | 33.99 | 113.50 | 248.53 |
| NO2 | 46.005 | 200-6,000 | 37.18 | 34.19 | 240.17 | 53.01 | 66.92 | 294.61 |
| HCNO HNCO | 43.025 | 300-5,000 (mid 1,382) | – | – | – | 71.30 | 214.35 | 314.39 |
| HOCN HNCO | 43.025 | 300-5,000 (mid 1,368) | – | – | – | 66.41 | 28.79 | 309.64 |
| HNCO | 43.025 | 300-5,000 (mid 1,478) | – | – | – | 69.46 | -76.14 | 310.21 |
| NCO | 42.017 | 200-6,000 | 40.10 | 131.80 | 232.38 | 55.84 | 166.71 | 290.66 |
| CN | 26.018 | 200-6,000 | 29.16 | 438.68 | 202.64 | 33.44 | 460.51 | 239.73 |
| HCNN CN2H | 41.033 | 300-5,000 | – | – | – | 71.16 | 506.17 | 323.42 |
| N2 | 28.014 | 300-5,000 | – | – | – | 32.76 | 21.47 | 228.09 |
| AR Ar | 39.948 | 300-5,000 | – | – | – | 20.79 | 14.59 | 179.89 |
| C3H8 | 44.097 | 300-5,000 | – | – | – | 174.62 | -11.38 | 417.23 |
| C3H7 | 43.089 | 300-5,000 | – | – | – | 159.53 | 186.62 | 427.16 |
| CH3CHO C2H4O | 44.053 | 200-6,000 | 55.32 | -166.19 | 263.95 | 112.61 | -104.54 | 363.15 |
| CH2CHO OH3C2 | 43.045 | 300-5,000 | – | – | – | 97.68 | 80.77 | 358.54 |
What this calculator does not cover
- NASA 9-coefficient polynomials. The newer NASA Glenn format (McBride, Zehe and Gordon, 2002) adds T−2 and T−1 terms and more temperature ranges. This page reads the 7-coefficient CHEMKIN format only.
- Real-gas behaviour. These are ideal-gas properties at 1 bar for S and G; pressure changes S by −R ln(p/1 bar) and does not change ideal-gas cp or H.
- Mixtures. One species at a time. For a mixture, add the mole-fraction-weighted values (and the mixing entropy), or use the adiabatic flame temperature calculator, which does it for combustion products.
Parsing this file is the first project of Skill-Lync's MATLAB for Mechanical Engineers course: read thermo.dat, compute cp, H and S for every species, find the molar masses and save the plots. The combustion courses then use the same data in Cantera.
- MATLAB for Mechanical Engineers (project 1: parsing NASA thermodynamic data)
- Python for Mechanical Engineers
- Internal Combustion Engine Analyst course using Python and Cantera
Frequently asked questions
What are NASA polynomials?
NASA polynomials are curve fits of the ideal-gas specific heat, enthalpy and entropy of a species against temperature. The 7-coefficient form (from NASA's Gordon and McBride programs, used by CHEMKIN and Cantera) stores two sets of 7 coefficients: one below a common temperature, usually 1,000 K, and one above it. cp/R is a quartic in T; H and S follow by integration.
How do you calculate enthalpy from NASA polynomials?
H/RT = a1 + a2·T/2 + a3·T²/3 + a4·T³/4 + a5·T⁴/5 + a6/T, so H = R·T × that sum. Pick the low-temperature set below the species' common temperature and the high set above it. For O2 at 1,000 K this gives 22.707 kJ/mol, against NIST-JANAF's 22.703.
What is the 1000 K in a NASA thermo file?
It is the common (switch) temperature between the two coefficient sets. In the GRI-Mech 3.0 file 50 of the 53 species switch at 1,000 K, but HNCO switches at 1,478 K, HCNO at 1,382 K and HOCN at 1,368 K. A code that always switches at 1,000 K gets those three up to 1.6% wrong in cp between 1,000 K and their own common temperature.
Why does the enthalpy of CO2 come out negative?
Because the NASA polynomial gives absolute enthalpy on the standard-elements scale, which includes the heat of formation. CO2 at 298.15 K is -393.51 kJ/mol, its heat of formation. To get the heat needed to warm it, subtract H(298.15 K): CO2 from 298.15 to 1,000 K takes 33.40 kJ/mol.
What temperature range are NASA polynomial coefficients valid for?
Only the range on each species' first line. In GRI-Mech 3.0, 27 species are fitted from 200 to 3,500 K, 13 from 200 to 6,000 K and 10 from 300 to 5,000 K. The 300-5,000 K on the file's second line is a default, not a promise: run O2 to 5,000 K and cp comes out 14.5% below NIST-JANAF.
How do you convert NASA polynomial results to per kg?
Divide the molar value by the molar mass in kg/mol. O2 is 31.998 g/mol, so its cp of 34.883 J/(mol·K) at 1,000 K is 1090.2 J/(kg·K). Take the molar mass from the element counts in columns 25-44 of the first line, not by parsing the species name.
Is this calculator accurate?
It evaluates the GRI-Mech 3.0 coefficients exactly. Skill-Lync parsed the file a second time in a separate Python script, and the page's numbers agree to 12 significant figures or the build fails. Against NIST-JANAF, six common species agree within 0.20% in cp from 298 to 1,000 K; methane differs more, as the comparison table shows.
Related on Skill-Lync
- Curve fitting calculator: the course's cp data is this file's O2 polynomial, which is why a split at 1,000 K fits it exactly
- Genetic algorithm simulator (the stalagmite function challenge of the same MATLAB course)
- Adiabatic flame temperature calculator and Rankine cycle calculator
- Student project: calculating thermochemical properties using the 7-term NASA polynomials
- MATLAB project ideas and Python project ideas
- All free engineering tools
Sources
- G. P. Smith et al., GRI-Mech 3.0, thermo30.dat (thermodynamics released 30 Jul 1999), the file used in the course project.
- M. W. Chase Jr., NIST-JANAF Thermochemical Tables, 4th ed., J. Phys. Chem. Ref. Data Monograph 9 (1998): tables for O2, N2, H2, H2O, CO, CO2 and CH4, downloaded 20 Nov 2026.
- B. J. McBride, S. Gordon and M. A. Reno, Coefficients for Calculating Thermodynamic and Transport Properties of Individual Species, NASA TM-4513 (1993): the 7-coefficient form.
- R. J. Kee, F. M. Rupley and J. A. Miller, The Chemkin Thermodynamic Data Base, Sandia report SAND87-8215B (1990): the fixed-column file format.
- Cantera, data/nasa_gas.yaml (methane cross-check), fetched 20 Nov 2026.
- Atomic masses: IUPAC abridged standard atomic weights (H 1.008, C 12.011, N 14.007, O 15.999, Ar 39.948). R: CODATA 2018.
- All numbers on this page: Skill-Lync, checked by scripts/verify/nasa-polynomials.py, which parses the file independently and is cross-checked against this page's calculator code at build time.