ForHosting KIT · Science

Gay-Lussac's law calculator

Heat a sealed sample at 1 atm from 300 K to 600 K and its pressure doubles to 2 atm. Give the starting pressure in any unit and both temperatures in kelvin; the new pressure comes back in that same unit. 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
P1
1
T1
300
T2
600
You get
P2
2
Ratio
0.0033333333

Gay-Lussac's law is the isochoric pressure-temperature relation for a fixed amount of ideal gas: pressure and absolute temperature stay directly proportional while volume is held constant. This calculator is the physics landing for that law when the unknown is the new pressure after the sample is heated or cooled. You supply the initial pressure, the initial temperature in kelvin, and the new temperature in kelvin; the engine returns the final pressure from P2 equals P1 times T2 divided by T1. Both temperatures must be strictly positive because kelvin is an absolute scale and the rearrangement divides by T1.

What Gay-Lussac's law computes and which quantities to enter

Gay-Lussac's law, also taught as Amontons's law of pressure and temperature, states that the pressure of a confined ideal gas is directly proportional to its absolute temperature when the volume and the amount of gas stay fixed. For two equilibrium states of the same sample the proportion becomes P1 over T1 equals P2 over T2, which rearranges to the working formula P2 equals P1 times T2 divided by T1.

Absolute temperature is mandatory: the zero of the scale must be true thermodynamic zero, so this calculator expects T1 and T2 in kelvin. A Celsius reading of twenty-five degrees is two hundred ninety-eight point one five kelvin, not twenty-five, and feeding Celsius without conversion will scale the pressure by the wrong ratio. Pressure units are free as long as they are consistent: if P1 is in kilopascals, P2 is in kilopascals; if P1 is in atmospheres, P2 is in atmospheres.

The tool does not convert bar to psi, does not introduce volume the way the combined gas law would, and does not apply a compressibility factor. It answers one physics question: given the starting pressure and the two kelvin temperatures of an isochoric process, what is the new pressure. Both temperatures must be strictly positive.

Zero kelvin is not a reachable thermodynamic state for the sample, and a non-positive T1 would make the division undefined or unphysical. Negative kelvin is rejected for the same reason.

Where a Gay-Lussac's law calculator earns its keep

Secondary-school physics and first-year university courses constantly assign isochoric problems that give two kelvin temperatures and one pressure and ask for the missing final pressure, often for sealed-flask demonstrations, autoclave sketches, or a rigid-cylinder heating story. Exam-prep generators need a deterministic oracle that marks wrong the case of a zero or negative temperature instead of silently returning infinity that a buggy grader might treat as success.

Process and safety trainees sanity-check closed rigid vessels when only an isochoric temperature swing is known and the target is a new pressure, treating the result as a textbook baseline rather than a full vessel-code calculation. Failed validation does not consume balance. Keep temperatures in kelvin end to end, convert Celsius or Fahrenheit before calling, keep pressure units consistent, and pin the final-pressure value in tests so homework checks, LMS plugins, and edge workers stay reproducible without standing up a thermodynamics solver of your own.

Variable-volume Boyle or Charles work, combined-gas rearrangements, mole-based ideal-gas solves, and real-gas equations of state remain outside this landing, so treat the number as the classic constant-volume pressure-temperature baseline. Round-trip checks are easy: divide P1 by T1 to recover the conserved ratio, multiply by T2, and confirm it equals the published P2 within the same twelve-decimal rounding used for goldens.

Sealed-vessel and autoclave notes

Estimate final pressure after a measured isochoric temperature change for demos, lab notebooks, and safety briefings that assume constant volume.

How is final pressure computed from Gay-Lussac's law?

Send finite numbers p1 (initial pressure), t1 (initial kelvin), and t2 (new kelvin) with both temperatures strictly positive.

Do I enter Celsius or kelvin?

Kelvin only. Convert first: T(K) = t(°C) + 273.15. Feeding a Celsius reading as t1 or t2 will scale pressure by the wrong ratio because zero Celsius is not absolute zero.

Which pressure units does the calculator use?

Any consistent pair. If p1 is in kilopascals, p2 is in kilopascals; if p1 is in atmospheres, p2 is in atmospheres. The tool does not convert between pressure units.

What happens if a temperature is zero or negative?

The calculation is refused. Kelvin is an absolute scale, zero kelvin is not a reachable state for the gas, and the formula divides by the first temperature, so both values must be above zero.

Why doesn't the calculator ask for the volume?

Because Gay-Lussac's law assumes that the volume and the amount of gas stay fixed, as in a rigid sealed vessel. If the volume changes as well, the problem belongs to the combined gas law instead.

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/phys/gay-lussacs-law

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/phys/gay-lussacs-law \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"p1":1,"t1":300,"t2":600}'
{
  "p1": 1,
  "t1": 300,
  "t2": 600
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "phys.gay_lussacs_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.

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.

The implementation is a pure parse function with no network, no clock, and no randomness, so homework checks, lab notebooks, and API clients share one deterministic result.

What Gay-Lussac's law computes and which quantities to enter

The arithmetic is a single multiply-divide on finite numbers, fully deterministic, with no network, no random seed, and no clock, so identical inputs always serialize to the same JSON.

Input contract, response shape, and error behaviour

Both temperatures must be strictly greater than zero: a zero kelvin input and a negative temperature fail with a message that the temperature must be positive, matching the product promise that the one-over-T1 singularity never masquerades as a finite answer. Initial pressure may be zero or negative as a linear-model input, yielding a matching signed or zero P2, but typical coursework uses a positive starting pressure. Classic textbook checks include doubling the absolute temperature of a one-atmosphere sample from three hundred kelvin to six hundred kelvin and recovering two atmospheres, or heating from two hundred fifty kelvin at one hundred kilopascals to five hundred kelvin and recovering two hundred kilopascals. POST a JSON body with three required finite numbers: p1, the initial pressure in any consistent unit; t1, the initial absolute temperature in kelvin; and t2, the new absolute temperature in kelvin after the isochoric change. Each field may arrive as a JSON number or as a numeric string; aliases initial_pressure, P1 and pressure, initial_temperature and T1, and final_temperature, T2 and new_temperature are accepted so notebooks and lab exports map without renaming columns. Missing fields, empty strings, and non-finite values fail with invalid_input naming the field. On success the body echoes cleaned p1, t1, and t2, reports the solved p2, includes ratio as P1 divided by T1, and documents formula P2 equals P1 times T2 over T1 with method gay_lussacs_law. Pricing for successful API calls is the published base of $0.002 per item; validation failures do not consume prepaid balance.

Homework and exam checks

Enter initial pressure and two kelvin temperatures, compare P2 with hand work, and get a clear invalid_input when any temperature is zero or negative.

Curriculum fixtures and auto-graders

Produce deterministic Gay-Lussac P2 checks for lessons, LMS plugins, and CI goldens without embedding a full gas-law solver.

What happens if a temperature is zero or negative?

The task fails with invalid_input. Both T1 and T2 must be positive kelvin; at or below zero the law either divides by T1 or leaves the absolute-temperature scale, so the engine rejects the request and does not bill the call.

What does the Gay-Lussac's law 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 →