Physical · the microphone you already own
The Temperature in the Second Arrival
Clap once at a bare wall you have measured with a tape. Your microphone hears the clap, and then hears it again. The gap between those two arrivals is inside a single recording, so every unknown delay in your device's audio stack cancels exactly, and twice the distance divided by that gap is the speed of sound in your air, once you clap where the microphone is. Invert Cramer's equation and it becomes your room's air temperature. The interesting part is what the error bar is made of: at a 3 m wall with a 1 cm tape, about 99 percent of it is the tape measure and under 1 percent is the microphone.
One recording, two arrivals
Nine recordings ship with this page. Every one of them was generated from a closed form by research/speed-of-sound-room/make-specimens.mjs, so the gap between the arrivals in each is not measured but chosen, and exact. Seven of them are here; the last two are further down, because what they demonstrate is not the estimator but what happens after it. Press one and watch the same estimator that will later measure your room go at it. It has not been told which recording it is looking at, because there is nothing in what it receives that would say: it gets samples and a sample rate, and no third thing.
loading the recordings…
What is drawn is the envelope of the recording cross-correlated with its own direct arrival: a matched filter, using the pulse the recording already contains rather than an assumed shape, which is why a clap, a snap, a knock and a played click all work with no change of code. The envelope rather than the raw correlation, because a hard wall can invert the phase of a reflection and a raw correlation peak would then point downward and be missed. The dashed line is the detection floor. Every local maximum above it is marked.
exact only if the sound is made where it is heard
That second line is not a formality. Put the clap x metres in front of the device, toward the wall, and the direct path is x while the wall path is 2L − x, so the gap is (2L − 2x)/c and 2L/dt comes out too high by exactly L/(L−x). At a 3 m wall, hands 10 cm in front of the phone read 3.4 percent fast, which is ten times the entire error bar a 1 cm tape gives you, and it lands inside the range of speeds a habitable room can have, so nothing refuses it. It is sized further down, and the step-back cross-check is the one measurement here that removes it.
Why the gap, and never a round trip
The obvious design plays a sound and times the echo. It cannot work in a browser. Output latency plus operating-system input latency runs from tens to hundreds of milliseconds, is not reported anywhere you can trust, and differs between calls. One round trip across a 3 m room is about 17 ms. An estimator built that way is measuring the audio stack, not the room, and no amount of calibration fixes it, because the thing being calibrated moves.
So this page never looks at when anything was emitted. Both arrivals came through the same input chain, in the same buffer, in the same second. Every fixed latency, every buffer offset and every filter group delay is common to both and subtracts out exactly. That is the whole reason this measurement can live in a web page, and it is also why there is no calibration control anywhere here and never will be.
Before it measures you, it recovers answers it was not given
You have no second instrument. Nobody has published the temperature of your hallway, and if this page reported a plausible number from a hard-coded constant you would have no way to catch it. So the same estimator, unmodified, first has to recover three delays that were chosen rather than measured. Until all three pass, the live measurement below refuses to run at all: that is enforced in /_kit/anchor.js, not by good intentions.
running the slate…
The tolerance is ±0.050 ms on every specimen, and the reason is a measurement rather than a preference: the estimator's own stated interval for a recording at this signal-to-noise ratio is about 5.9 microseconds, and over 240 independent noise draws the largest error it made was 17.0 microseconds. The controls sit 5.8 and 8.7 ms away from the anchor, so a window this wide cannot let a wrong answer through. The kit refuses at construction if it could.
What a fake would do
The same three recordings, run through an estimator that ignores its input entirely and returns the anchor's value with a tight error bar. It is not described here, it is executed here, on this slate, in your browser.
…
Four recordings where the honest answer is no answer
An estimator that always returns something is not an estimator, it is a random number generator with good manners. These four go through the identical function and it declines each one for a different named reason.
| recording | required refusal | what it did |
|---|
The estimator a competent builder would actually write
Here is the trap this page is built around. Take the largest correlation peak after the direct arrival. It is obvious, it is what a careful person writes, and on a real room it is wrong in a way that leaves no trace. A phone 1.200 m above the floor gets a floor reflection whose path is twice that height, so it comes back earlier than a wall three metres away. That much is geometry and holds in any room where the device is lower than the wall is far. In the room this page ships it also comes back louder, and that half is a choice rather than a law: the generator was told to make the floor bounce 0.45 of the direct arrival and the wall echo 0.22, and a carpet under a bare plaster wall would reverse them. It does not matter which is louder. The refusal fires because there is more than one arrival, not because the wrong one is loudest.
Both rules are run on the same detected arrivals from the same recording. The difference is only which one is allowed to be called the answer.
The move that breaks the tie, and needs no wall at all
Step back a tape-measured amount at the same height and clap again. The floor path is twice your height and the ceiling path is twice your headroom; neither depends on how far the wall is. Only the wall's arrival moves, and it moves by exactly twice the step divided by the speed of sound. That gives a speed from the change in distance alone, which quietly drops out every fixed offset at once: where the wall's face really is, where inside the device the microphone really sits, how far the source sat from it. None of them changed, so none of them matter.
Now your room
…
You need a bare wall, a few metres of floor and a tape measure. Measure the perpendicular distance from your device to the wall, and be honest about how well you know it, because that number is about to become almost the entire error bar. Then stand still and clap once, hard, facing the wall, with your hands as close to the device as you can get them.
That last instruction is the one worth reading twice, because it is the only error on this page that the error bar does not contain. The equation assumes the sound is made where it is heard. Every centimetre your hands sit in front of the device, toward the wall, reads as roughly one part in L too fast: at a 3 m wall, 10 cm is 3.4 percent, which is ten times the whole interval a 1 cm tape gives you and reads as a room more than twenty kelvin too warm. It is a bias and not a scatter, so it has a sign, it does not average away if you clap again, and it cannot honestly be added in quadrature with anything. Put your hands at the phone, or do the two-position cross-check below, which cancels it.
The clap is the default for a reason. If your browser refuses to switch echo cancellation off, it is designed to remove exactly the reflected copy of what a page just played, which is the one thing this measurement needs. A clap gives it nothing to subtract.
not measured
| arrival, ms after the direct | c it would imply, m/s | strength |
|---|---|---|
| nothing recorded yet | ||
what your browser actually granted
not yet
the speed of sound in your own air
the cross-check: step back and do it again
Walk a measured distance straight back from the wall, keeping the device at the same height, and record again. Only the wall's arrival should move. If more than one moved, something else changed too and this page will say so rather than pick.
| arrival, ms after the direct | c it would imply, m/s | strength |
|---|---|---|
| nothing recorded yet | ||
and, only now, a temperature
The distance is entered and the arrival is locked before any temperature appears, and there is no control here that lets you enter a known temperature or calibrate against a thermostat. If you could see the answer while nudging the distance, you would nudge it until it agreed, and the result would stop being a measurement of anything.
Outside the range the cited model is stated to be valid over, so this is an extrapolation and is labelled as one.
Where the error bar comes from, and it is not the microphone
The speed is c = 2L/dt, so the two random errors add in quadrature and it is easy to see which one is doing the work. It is the tape. A 1 cm uncertainty on a 3 m wall is 3333 parts per million; the timing, on the shipped room recording the table below is computed from, is about 290. Squared and added, that puts about 99 percent of the variance on the tape and under 1 percent on the microphone, which is a strange thing to discover about a measurement whose difficult-looking part was supposed to be the acoustics. The two only come level when the tape is good to under a millimetre.
| tape uncertainty | σ on c, m/s | σ on T, K | from the tape | from the microphone |
|---|
This table is recomputed from your own recording as soon as you lock one. Until then it is computed for the shipped decoy's geometry, and says so above.
And the term that is not in that table at all
Everything above is scatter: it has no sign, and it shrinks if you measure more carefully. Where your hands were when you clapped is not like that. It biases the answer one way, it survives any number of repeats, and it is larger than both of the terms in the table for any offset a person would call small. So it is not in the quadrature sum, and this is what it is instead.
| clap this far in front | error in c | m/s, and against the tape | what a 20.00 C room reads as |
|---|
And the same error as two recordings, because a table is not a demonstration
The table above is arithmetic. These two recordings are not: they ship with the page, they were generated with the clap 0.100 m in front of the device, once at a 3.000 m wall and once from a metre further back, and they go through the same estimator as everything else here. Watch both halves at once. The estimator recovers the gap it was given, to a few microseconds, exactly as it does on the anchor: it is not broken and it has not been fooled. The answer is 3.4 percent wrong, and no gate on this page fires, because a wrong speed of sound that lands between 319 and 358 m/s looks exactly like a right one. Then the same pair, one metre apart, through the step method: the hands were in the same wrong place both times, so the offset cancels in the difference and the true speed comes back.
loading the offset pair…
This is not a toy version of thermometry. It is the mechanism.
The reasonable dismissal at this point is that c(T) is just algebra and you have a thermostat. But the algebra is not a convenience. It is how the kelvin was fixed. The US National Institute of Standards and Technology puts it plainly:
“To date, the most accurate values of kB have been obtained by acoustic thermometry, which relies on the fact that the speed of sound in a gas is directly dependent on its temperature.”
NIST, Kelvin: Boltzmann Constant, which also gives the value that ended the argument: “Based on these data, the value of kB in the revised SI is 1.380649 x 10-23 J K-1.”
Since 2019 that number is not measured. It is defined, exactly, and the kelvin is defined from it. Your clap and the SI's kelvin run down the same equation, c² = γkT/m, with no calibration against any other thermometer anywhere in the chain. That is what makes an acoustic thermometer a primary one, and it is the property your clap actually has.
What your clap does not have is the precision. Drag your tape down as far as you like and watch yourself fail to close the gap.
The 2025 model's own experimental validation measured the speed of sound with an acoustic wavelength meter set up in a hemi-anechoic chamber, and its authors conclude that acoustic thermometry in humid air “may be realized at the level of 0.015 K”. A hallway, a tape measure and a clap will get you a few kelvin. It is the same instrument. What separates the two numbers is a ruler you can trust to a micrometre, air whose humidity and composition are known instead of assumed, and a room built to have no second arrival in it at all.
The error bar you get is not the error bar you deserve
Here is the part that hurts, and it is exact arithmetic rather than an opinion. Speed goes as the square root of absolute temperature, so every fractional error in c doubles on the way into T in kelvin. Then Celsius has a suppressed zero 273.15 K below the reading, so the same absolute error is a far larger fraction of the number you actually say out loud.
So the honest headline is not that you measured the temperature of your room. It is that you measured c to well under one percent, which is a good measurement of a physical property of your own air with a hallway and a phone, and it bought you a temperature to a few degrees, which is a poor thermometer. A five dollar wall thermometer beats you easily, and the reason is not that your acoustics were bad. It is that the physics puts a factor of two and a suppressed zero between the two numbers.
And you did not measure a temperature. You measured a speed and assumed a gas.
The conversion needs the ratio of specific heats and the molar mass of whatever you are breathing. Change that assumption and the identical recording, the identical gap and the identical arithmetic report something else entirely.
Helium reads absurdly cold for the same speed because sound runs about three times faster in it. The kelvin figure beside the celsius one is the one worth reading: for helium to carry sound as slowly as the air in your room does, it would have to be down in the low tens of kelvin. Switch the selector back to air and the panel prints that number too, and the helium one is about a ninth of it. This is the same lever a helium voice pulls, from the other end.
The check, recomputed in front of you
The equation turning a speed into a temperature is Cramer's interpolating equation, re-implemented here from the published coefficients. Nobody's code was copied: an equation is not copyrightable expression, an implementation of it is, so this one is ours. The question is then whether ours is right, and the answer cannot be the equation itself. So it is checked against two independent constructions that share none of its sixteen coefficients.
| t, C | Cramer, dry, m/s | ideal gas √(γRT/M) | 331.3 + 0.606t |
|---|
Three constructions with nothing in common but the physics. Across the whole stated validity range the columns never differ by more than 0.13 percent, and at 20 C they sit within 0.054 percent of one another. This check has teeth where it matters and not where it does not: transposing a digit in the leading temperature coefficient moves the first column by 0.54 m/s, three times the entire spread between the columns at 20 C, and would be caught instantly. Getting the last digit of that same coefficient wrong moves it by 0.0001 m/s and would not be. It is a check on the shape, not on the seventh significant figure.
The reference is contested and this page is not going to pretend otherwise. Wong argued in 1995 that Cramer had underestimated the uncertainties of his own parameters, and that once those are re-assessed his own c0 = 331.29 m/s “is within the range of estimated uncertainties”. That is a claim that the two values cannot be told apart, not a claim that Cramer's is wrong, and this page does not upgrade it into one. The disagreement is printed above in metres per second, in percent, and in the apparent temperature it is worth. It is roughly seven times smaller than the interval a 1 cm tape measure gives you, which is the honest way to size a fight you are standing well outside of.
Everything on this page is recomputed offline, including a 240 draw Monte Carlo that checks the estimator's own error bar covers the scatter it actually produces, and four deliberately broken builds of the estimator that each have to fail: node research/speed-of-sound-room/verify-speed-of-sound-room.mjs prints 227/227 checks passed.
Every free choice this page made
None of these is a law of nature. Each one is a decision that could have gone another way, and each one moves the answer.
| choice | set to | why, and what it costs |
|---|
What this measurement is not
It is not the room's temperature. It is the temperature of the air along that one path, out and back, at whatever height your device sat. Air in a room is not at one temperature: it stratifies vertically, and this number is an average along one line at one height. It is not an HVAC diagnostic and it will not catch a thermostat in a lie.
It is not two results. The speed and the temperature are one measurement reported in two units. The second is a conversion of the first through somebody else's equation, and it inherits every assumption in that equation, including a humidity you set with a slider rather than measured.
Humidity is a genuine confound and one clap cannot resolve it. Across the full range at 20 C it moves the speed by about 1.25 m/s, which reads as more than two kelvin of apparent temperature. You cannot separate temperature from humidity acoustically here, and the page never pretends to: the slider is a visible assumption, not a hidden constant.
A draught does not spoil it, and that is not luck. The sound goes out and comes back through the same moving air, so the bulk flow term cancels to first order and what is left is of order (v/c)², which at a metre per second is under nine parts per million. That is a statement about the order of the residual, not a claim that the room is windproof.
It cannot tell whether you clapped in the right place. Everything else on this page is checked by something. This one is not: hands 10 cm in front of the device read 3.4 percent fast, the answer stays inside every band the page tests, and the error bar beside it does not widen by a millimetre. The two recordings above are that failure, shipped, so it is at least visible. If it matters to you, the two-position cross-check is not a nicety, it is the measurement.
343 m/s is not the speed of sound. It is the speed in dry air at about 20 C at sea level, and the entire point of this page is that your air is its own thing. If your measurement lands on 343 to three figures, that is a coincidence rather than a confirmation, and the wall you picked is still the assumption the whole number rests on.
What was actually tested here, and what was not
The live path is driven in a real headless browser by node scripts/check-live-sensor.mjs --only=speed-of-sound-room, which hands Chromium a known WAV as the microphone and asks this page what it measured. The page's own getUserMedia code runs unmodified. Two different injected files with different true delays are used, so a live path that quietly returned its anchor no matter what it heard would be caught.
What has not been tested is a real room. Every recording this page ships was synthesised, and the injected signals in the gate were synthesised too. A synthesised specimen proves the estimator recovers what was put in; it does not prove it survives a real clap in a real corridor with real furniture. That end-to-end pass has not been made, and until it is, the honest statement is that the live path has been proven only against injected signals.
The optional click path is not the path the gate drives. The gate exercises passive capture, which is what the clap uses and what the button above defaults to. The click differs by one thing: the page emits a short burst during the same capture. The estimator, the capture and the arithmetic after it are byte for byte the same, and the click disables itself if the browser refuses to turn echo cancellation off.