Science · 7 min read

What Happens Inside a Barrel in Under 2 Milliseconds?

how does a gun work?

A gun converts a tiny chemical explosion into a supersonic projectile in under 2 milliseconds, faster than the human nervous system can register sound.

The core idea

Chemical → kinetic

Propellant burns to gas, gas expands, gas pushes bullet. The entire mechanism exists to direct this energy.

2 milliseconds

The full firing sequence (ignition to muzzle exit) completes before the human nervous system registers the trigger pull.

Rifling adds spin

Spiral grooves inside the barrel spin the bullet, gyroscopically stabilizing it in flight. Without spin, it would tumble.

Key insight The bullet leaves the barrel before most of the propellant gas has finished expanding, which is why barrel length directly determines muzzle velocity. A longer barrel gives the gas more time to push. Cut the barrel short and you waste pressure. This is why rifles are faster than pistols firing identical ammunition.

Pick up a rifle cartridge and shake it. You can hear the powder rattle inside, like sand in a small brass tube. That loose collection of chemical granules is about to become a projectile traveling faster than sound in under two milliseconds, before the shooter's nervous system even registers the recoil.

A gun does not create an explosion inside the barrel. It creates a controlled, progressive burn that generates gas, and that gas is what moves the bullet.

Most people picture the moment of firing as a bomb going off inside a metal tube. The powder explodes, and the bullet rockets out. That image is wrong in an important way. Modern smokeless propellant does not detonate. It deflagrates: it burns rapidly from the surface of each grain inward, generating gas at a rate that builds pressure over milliseconds rather than microseconds. The distinction matters because a detonation would destroy the barrel. Deflagration creates a sustained push, a pressure wave that accelerates the bullet the entire length of the bore. The barrel is not a container for an explosion. It is a pressure vessel that converts chemical energy into kinetic energy, one inch at a time.

This means the barrel itself is doing real work. Every additional inch gives the expanding gas more time to push. A short barrel wastes gas; it vents at the muzzle as flash and blast before the gas finishes its job. A long barrel captures more of that energy. The entire engineering of firearms follows from this one fact.

Here is what happens in the 1 to 3 milliseconds between trigger pull and muzzle exit. The trigger releases the sear, a mechanical catch holding the firing pin under spring tension. The spring drives the pin forward. The pin strikes the primer, a small cup of impact-sensitive compound seated in the base of the cartridge case. The primer detonates (this part is a true detonation, but the primer is tiny), sending a jet of flame through a small flash hole into the main propellant charge.

The propellant ignites. Nitrocellulose-based powder grains burn at roughly 3,300 degrees Celsius, converting to approximately 3,000 times their solid volume in hot gas. Chamber pressure spikes to 50,000 to 65,000 PSI in a fraction of a millisecond. The brass cartridge case expands against the chamber walls, sealing the pressure from escaping rearward. The only path for the gas is forward, into the base of the bullet.

The bullet begins moving. As it travels down the barrel, spiral grooves cut into the bore, called rifling, bite into the bullet's copper jacket and force it to spin. By the time it exits the muzzle, a typical rifle bullet rotates at 150,000 to 300,000 RPM. That gyroscopic spin stabilizes the bullet in flight, keeping it point-forward through air resistance and crosswinds. Without rifling, a bullet would tumble end over end within a few dozen meters, losing accuracy and range almost immediately.

In a semi-automatic firearm, the story continues after the bullet exits. Residual gas pressure or bolt recoil drives the action rearward, extracting and ejecting the spent brass case. The return spring then pushes the bolt forward, stripping a fresh cartridge from the magazine and chambering it. The full cycle from firing to ready-to-fire-again completes in about 80 milliseconds.

Interactive -- the firing mechanism
receiver / action muzzle cartridge firing pin trigger 20 in 55,000 PSI
Barrel length 20 in
Charge weight 40 gr
55,000
Peak PSI
940
Muzzle m/s
1,764
Energy (J)
1.1
Barrel ms
At 20 inches, the barrel captures roughly 85% of the propellant gas energy. The 40-grain charge generates 55,000 PSI peak pressure, accelerating the bullet to 940 m/s before it exits. This is the sweet spot for rifle-length barrels: strong velocity with manageable weight.
The firing pin is a hardened steel rod held under spring tension. When the trigger releases the sear, the spring drives the pin forward at high speed. Its only job is to strike the primer with enough force to initiate ignition. The pin must be hard enough to survive thousands of impacts without deforming.

Why barrel length changes everything

The visual above reveals the most important relationship in firearm physics: barrel length versus velocity. The propellant gas continues expanding as the bullet travels. A longer barrel gives the gas more time and more distance to push. Cut the barrel short, and the remaining gas pressure vents uselessly at the muzzle as flash and blast, energy that could have been accelerating the bullet but instead becomes noise and light.

This is why the same ammunition produces dramatically different performance from different firearms. A 5.56 NATO round fired from a 4-inch pistol barrel reaches roughly 370 meters per second. The same round from a 20-inch rifle barrel reaches 940 meters per second, more than 2.5 times the velocity, carrying roughly 6.5 times the kinetic energy. The powder charge is identical. The bullet is identical. The only difference is how many inches of barrel the gas had to push against.

The relationship is not linear, though. The gas pressure drops as the bullet moves forward and the volume behind it increases. Each inch of barrel captures less additional energy than the inch before it. The first 10 inches do the majority of the work. After that, returns diminish steadily.

Interactive -- barrel length comparison
Pistol (4" barrel)
370
meters per second
energy dots (each = 100 J)
Rifle (20" barrel)
940
meters per second
energy dots (each = 100 J)
Rifle barrel 20 in
548
Pistol energy (J)
1,764
Rifle energy (J)
3.2x
Energy ratio
35.6
m/s per inch

Same ammunition, same powder charge. The only variable is barrel length. Drag the slider past 24 inches and watch the gains nearly vanish.

The diminishing returns of barrel length

Every inch of barrel adds velocity, but the gains shrink. After 24 inches, you are carrying extra weight for almost no additional speed.

This is the central engineering tradeoff in every firearm ever designed. Soldiers carry 14.5-inch to 16-inch carbines rather than 20-inch or 24-inch rifles because the velocity curve flattens. The first 10 inches capture the majority of the gas energy. Going from 16 to 20 inches adds roughly 120 meters per second. Going from 20 to 26 inches adds only about 35 meters per second. Each inch beyond 20 adds weight, reduces maneuverability in tight spaces, and makes the weapon harder to handle from vehicles or inside buildings.

Every firearm design is a compromise. A sniper rifle uses a 24-inch or longer barrel because the shooter fires from a stable position at extreme distances where every meter per second of velocity extends effective range. A close-quarters carbine uses a 10-inch to 14.5-inch barrel because the shooter needs to move through doorways and vehicles. The physics of gas expansion shapes the engineering of every barrel length ever manufactured.

dB
Why short barrels are louder. When a bullet exits a short barrel, more unburned gas remains at higher pressure. That gas escapes the muzzle and expands rapidly, creating a louder blast. A 10-inch barrel can produce 5 to 8 decibels more muzzle blast than a 20-inch barrel firing the same ammunition. This is also why suppressors are more effective on longer barrels: less residual gas means less gas for the suppressor to contain.

Once you understand that a gun is fundamentally a gas-expansion device, the rest of firearms physics clicks into place. Suppressors work by giving the gas somewhere to expand and cool before exiting the muzzle. Shorter barrels are louder because more gas energy remains when the bullet exits. Muzzle brakes redirect gas sideways to counteract recoil. Every accessory, every design choice, every engineering tradeoff connects back to one fact: the gun does not throw the bullet. The gas pushes it. The barrel is just a tube that gives the gas time to finish the job. Understanding this changes how you see every firearm, from a pocket pistol to a competition rifle. They are all the same machine, built around the same physical principle, optimized for different distances between the chamber and the muzzle.

The parts that make it work

Barrel

The tube that guides the bullet and spins it for accuracy.

A steel tube that guides the bullet. Spiral grooves (rifling) cut into the interior spin the bullet as it travels, gyroscopically stabilizing it in flight. Longer barrel = more time for gas to accelerate the bullet = higher muzzle velocity.

Cartridge

The complete round: case, primer, powder, and bullet in one package.

A self-contained unit: brass case, primer, propellant powder, and bullet. The case seals the chamber against escaping gas. Modern cartridges are one of the most reliable mechanisms ever engineered; failure rates are measured in parts per million.

Firing pin

The spring-loaded pin that strikes the primer to start ignition.

A hardened steel pin driven by a spring. When released, it strikes the primer (a small impact-sensitive compound in the base of the cartridge), which ignites and in turn ignites the main propellant charge.

Action

The mechanism that loads, fires, and ejects each round.

The mechanical system that loads, locks, fires, extracts, and ejects cartridges. Semi-automatic actions use the energy of firing to cycle automatically. Bolt actions require manual cycling between shots.

Rifling

Spiral grooves inside the barrel that spin the bullet for stability.

Spiral grooves cut into the barrel that impart spin to the bullet. Without spin, a bullet would tumble end-over-end aerodynamically. The spin rate (twist rate) is matched to bullet weight and length for optimal stability.

Trigger group

The safety-and-release system you pull to fire.

A mechanical safety-and-release system. The sear holds the hammer or striker under spring tension until trigger pull releases it. Most modern firearms have multiple redundant safety mechanisms that must disengage simultaneously.

Barrel length vs muzzle velocity

Pistol, 4" barrel 370 m/s
Carbine, 16" barrel 820 m/s
Rifle, 20" barrel 940 m/s
Long rifle, 26" barrel 975 m/s

Tips & maintenance

  1. The firing sequence (trigger pull to bullet exit) completes in approximately 1–3 milliseconds, well before the shooter consciously perceives the shot.
  2. Chamber pressure during firing reaches 50,000–65,000 PSI for rifle cartridges. The brass cartridge case seals this pressure against the chamber walls, protecting the action.
  3. Modern smokeless powder burns at ~3,300°C, hotter than the melting point of steel. The barrel survives because the contact time is too brief to transfer damaging heat.
  4. Rifling twist rates are matched to bullet weight: heavier, longer bullets need a faster twist (1:7") to stabilize; shorter bullets need slower twist (1:12") to avoid over-spinning.
  5. The sound of a supersonic bullet is two distinct events: the muzzle blast traveling at ~340 m/s, and the supersonic crack of the bullet’s shockwave, which arrives first at the target.

Common questions

A semi-automatic firearm fires one round per trigger pull. The action cycles automatically (ejecting the spent case and chambering a fresh round) but the trigger must be released and pulled again for each shot. A fully automatic firearm continues firing as long as the trigger is held and ammunition remains. Fully automatic civilian ownership is heavily restricted in most countries.

Modern smokeless propellant (nitrocellulose) is an oxidizer-fuel compound; it contains its own oxygen chemically bound in the molecule. It doesn’t require atmospheric oxygen to combust, which is why it burns in the sealed, oxygen-depleted chamber. This is also why firearms function in vacuum or underwater environments.

A suppressor (the correct term) reduces sound by giving the propellant gas somewhere to expand and cool before exiting the muzzle. Baffles inside the suppressor trap and slow the gas. Typical reduction is 20–35 decibels, bringing a gunshot from ~165dB to ~130–145dB, still louder than a jackhammer. The silent assassin depiction in film is fictional; supersonic bullets also produce a separate crack that the suppressor cannot affect.

Rifling grooves in the barrel engage the bullet’s soft metal jacket and impart spin, typically 1 rotation per 8–12 inches of travel, resulting in 150,000–300,000 RPM at muzzle velocity. This gyroscopic spin stabilizes the bullet’s orientation in flight, preventing aerodynamic tumbling. A spinning bullet maintains its point-forward orientation through drag and crosswinds far better than an unspun projectile.

A misfire (no ignition) occurs when the primer fails to ignite, whether from manufacturing defect, moisture, or insufficient firing pin strike energy. A hangfire is more dangerous: a delayed ignition where the primer ignites but the propellant burns slowly. Standard protocol is to keep the firearm pointed safely downrange for 30 seconds before opening the action, since a hangfire can fire during that window.

Barrel temperatures during sustained fire can reach 500–800°C, approaching the steel’s tempering temperature. At extreme temperatures, the barrel loses hardness, accelerating wear. Machine guns use quick-change barrel systems for this reason. The bore erodes from the sustained heat and friction, eventually widening enough to degrade accuracy, measured in "rounds of barrel life."