Combined gas law calculator
Halve the volume from 2 to 1 while pressure doubles from 1 to 2, and the temperature stays at 300 K: P·V/T is the same in both states. Enter any five of the six values and get the sixth. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Initial pressure
- 1
- Initial volume
- 2
- Initial absolute temperature
- 300
- Final pressure
- 2
- Final volume
- 1
- Value
- 300
- T2
- 300
- Solved
- T2
- Ratio
- 0.0066666667
This combined gas law calculator finds the single missing pressure, volume, or temperature when a fixed amount of ideal gas changes between two states at constant moles. The defining relation is P1 times V1 over T1 equals P2 times V2 over T2, which unifies Boyle’s, Charles’s, and Gay-Lussac’s laws into one proportional statement using absolute temperatures. Temperatures must be absolute—typically kelvin—so zero temperature is rejected as invalid, because division by absolute zero is undefined and has no meaning in this model. Pressures and volumes may use any consistent unit families; the tool never converts atmospheres to pascals or liters to cubic meters for you. The arithmetic is fully deterministic with no network calls, no sampling, and no date-dependent shortcuts.
What the combined gas law means and what you get
The combined gas law states that for a fixed quantity of ideal gas, the product of pressure and volume divided by absolute temperature is the same in the initial and final states: P1 times V1 over T1 equals P2 times V2 over T2. It is the single-equation form of the three classical gas laws when the amount of gas does not change and no chemical reaction alters the mole count.
Boyle’s law appears when temperature is held fixed, Charles’s law when pressure is fixed, and Gay-Lussac’s law when volume is fixed; the combined form keeps all three free so one unknown can still be found from five knowns. Absolute temperature is essential: Celsius or Fahrenheit offsets would break the proportion, which is why T1 and T2 must be kelvin (or another absolute scale) in homework and in this calculator.
How the six state variables are read and how the solve stays reproducible
Exactly five of the six must be present; omit the single unknown you want computed. Optional leading plus signs and scientific notation on numeric strings are allowed when they parse as finite decimals; embedded spaces and non-numeric tokens are rejected with a clear message so a bad cell does not become a wrong pressure or temperature. When the unknown is a temperature, the computed result is also checked and rejected if it is numerically zero.
Denominators that appear in the rearrangement—depending on which variable is missing—must likewise be non-zero. After solving, both sides of P V over T are compared within a tight relative tolerance as a cross-check.
Where the combined gas law fits in study, design, and software
Students meet P1 V1 over T1 equals P2 V2 over T2 when a textbook unifies Boyle, Charles, and Gay-Lussac after separate chapters, when a lab compresses a syringe of air while measuring temperature, or when a contest problem gives five state numbers and asks for the sixth without introducing moles. Teachers can pre-generate answer keys for modest pressures and volumes without trusting opaque calculator apps that silently switch from kelvin to Celsius or drop a factor of two.
Developers call the same contract from scripts to seed deterministic test vectors for thermo demos, to normalize user-entered two-state gas problems before a process sketch, or to satisfy programming-challenge statements that demand a single missing pressure or temperature rather than a hand-waved estimate. Process and product first-order checks use the combined law when only the six P V T slots matter and n and R are not yet in play.
What you can do with it
Homework and lab checks
Solve for the missing P, V, or T in two-state ideal-gas problems using P1V1/T1 = P2V2/T2 before grading worksheets.
Tutoring and process sketches
Normalize user-entered five-of-six state data into a full P–V–T pair for lessons, labs, and first-order design checks.
FAQ
What does the combined gas law calculator cost?
It is free in your browser on this page.
What equation does this tool use?
The combined gas law P1·V1/T1 = P2·V2/T2 for a fixed amount of ideal gas. You omit exactly one of the six variables and the engine solves for it.
What happens if temperature is zero?
Absolute temperature of zero is invalid in the combined gas law because the T terms appear in denominators and have no physical meaning at absolute zero in this model.
Do I need to use kelvin?
Yes for absolute temperatures: any absolute scale works if both T1 and T2 use it, but Celsius or Fahrenheit offsets break the proportion. Homework almost always expects kelvin.
Does this include n and R from the ideal gas law?
No. This calculator only rearranges the two-state combined proportion. Supply five of six P, V, T values; it does not solve PV = nRT for moles or the gas constant.
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/thermo/combined-gas-law \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"P1":1,"p1":1}'const res = await fetch("https://api.kit.forhosting.com/thermo/combined-gas-law", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"P1": 1,
"p1": 1
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/thermo/combined-gas-law",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"P1": 1,
"p1": 1
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/thermo/combined-gas-law", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"P1":1,"p1":1}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"P1":1,"p1":1}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/thermo/combined-gas-law", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"P1": 1,
"p1": 1
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "thermo.combined_gas_law",
"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.
Limits
max_abs_value | 1000000000000000 |
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
You supply any five of the six state variables and leave the unknown out of the request; the engine rearranges the identity and returns the full set of six values, the name of the variable it solved, and the common P V over T ratio.
What the combined gas law means and what the response contains
This tool returns the six state fields P1, V1, T1, P2, V2, and T2 with the solved value filled in, a solved tag naming which field was omitted, a value echo of that unknown, the shared ratio of P V over T, the precision used, a method tag combined_gas_law, and a short formula reminder. There is no real-gas equation of state, no ideal-gas constant R, and no automatic unit conversion: the engine either rearranges the proportion inside the supported numeric range or rejects the input with invalid_input. Rejected cases include missing more or fewer than one of the six variables, non-finite values, magnitudes above the documented ceiling, zero absolute temperature, and zero denominators required by the chosen rearrangement.
How the six state variables are read and how the solve stays reproducible
Preferred field names are P1, V1, T1, P2, V2, and T2, with aliases such as p1, pressure1, and initial_pressure for the first pressure, and matching patterns for volume and temperature on both states, so spreadsheets, query strings, and typed forms can reuse the same contract. Provided absolute temperatures T1 and T2 must be non-zero: a zero value fails with invalid_input and a message that names the field and explains that absolute temperature of zero is invalid in the combined gas law, so division by T never silently becomes infinity. An optional precision field, with aliases decimals and dp, chooses how many decimal places to expose for the numeric outputs, defaulting to ten and capped at fifteen so JSON goldens stay stable. 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 the combined gas law yourself.
Where the combined gas law fits in study, design, and software
Product and education tools use the endpoint when a learner leaves one field blank and the UI must show the solved state and the shared ratio. On this page the work runs entirely in your browser; through the API each successful lookup costs $0.002, failed validation is not charged, and nothing is stored after the response returns. That split — free interactive exploration and a priced, identical API — matches the rest of the KIT tier-A catalog and lets you move from a classroom demo to an automated pipeline without changing the mathematical result. Pair it with other thermo helpers when you need latent heat or expansion steps, and with math endpoints when you are building a small lab of free, deterministic physics calculators.
Integration use cases
Deterministic test fixtures
Generate reproducible combined-gas-law solutions for unit tests, thermo demos, and CI assertions on the solved variable.