How Do Fireworks Work? With STEM!

How do fireworks work? With STEM! Let’s take a look at the chemistry behind fireworks. And while we’re at it, let’s look at the history of fireworks, too.

My failed STEM science project!


As you can see above, I attempted a STEM science experiment in honor of July 4th! I attempted to create a black snake. When baking soda and powdered sugar react with heat, they create carbon dioxide and a cool black snake. At least the experiment smells like burned marshmallows!

I used kerosine and it gets, uh, hot! I decided against posting the ingredients after I ended up with a huge scorch mark on our deck. This is not an ideal STEM science project for kids. Heck, it’s not a good project unless you want to anger your significant other w/ deck damage. You can purchase a safer STEM version! Here’s what the experiment should look like when under control.


So how do fireworks work, exactly? Fireworks are chemical reactions! Let’s look at the STEM behind fireworks.

For fireworks to work, they require three key components: an oxidizer, a fuel, and a chemical mixture to produce the color. The oxidizer breaks the chemical bonds in the fuel, releasing all the potential energy that’s stored in those bonds. To ignite this chemical reaction, all you need is a bit of fire, in the form of a fuse or a direct flame.


Each firework is made of a tube that contains gunpower and dozens of pods. Inside the pods are packs of chemicals. The metal salts and metal oxides create the colors! Each pod inside one of the tubes creates a dot of color in the fireworks explosion. Imagine how many pods there are!


How did people come up with fireworks in the first place?

According to the American Pyrotechnics Safety and Education Foundation, around 800 A.D., Chinese alchemists mixed together saltpeter, sulfur, and charcoal and created gunpowder. They were actually looking for a recipe for eternal life, but they still changed the world with their invention! They used it to scare away evil spirits. So they were more focused on the noise factor.

The Smithsonian website states that Europeans were introduced to gun power during the Crusades in the 13th century, not by Marco Polo. (although he usually gets credited with this) I thought so, too. Good thing I looked this up before our next Trivia Night!

Marco Polo


It seems obvious that heat sets off the fireworks. Heat is also what starts the chemical reaction of the substances inside the tubes. When heat is needed to drive a reaction, this is called an endothermic reaction.Heat excites the electrons of the metal salts and metal oxides and causes them to jump to a higher energy level. When the electrons go back to their original state, they release excess energy. Our eyes see the energy as wavelengths of light.

The different elements in the chemical compounds release different amounts of energy. To us, that means different colors!

giphy of burning elements

For red, add lithium (Li).

For yellow, add sodium (Na) compounds.

For blue, add copper chloride compounds.

For green, you actually add barium. (not listed above)

For purple, add a mixture of blue-producing copper and red-producing strontium. (Sr)

For orange, add calcium salts. (CaCl2)

For white and silver, add aluminum, magnesium, or titanium. 

chemical oxidation colors


 This type of light is called luminescence.

Luminescence is light that is given off when electrons in elements move around. This happens at lower temperatures than incandescence. hence the term, ‘cold light.’

This can happen via a chemical reaction, stress on crystal structures, an electric current passing through a certain substance, or if energy such as UV light passes through a substance.

Incandescence is light produced when objects are hot enough to glow. So it is also called ‘hot light.’ Example candle glowing, or match.

burning candle
periodic table of fireworks


In case you’re interested, I colored in a periodic table with the elements that have electrons that excite and jump levels, producing colors.


If you want instructions or advice about the black worm, use the ‘contact me’ page. I had several fails, so I’ve got ideas about how to succeed with this one. I promise I’ll get back to you!

Don’t think the black worm going to make it into the book, though.

Here’s to clear skies! Enjoy the fireworks! 

Got lucky and captured this surprising display!

My budding youtube channel is here! 

I love comments and connecting. Louie and would be oh so happy if you Please subscribe! Thanks for stopping by!


Notify of

Inline Feedbacks
View all comments
Amy Laundrie
July 2, 2019 7:36 am

Hi Sue,
I wish my grandkids and I could have joined you for your “hot” experiment. (And I hope the damage to your deck isn’t too bad.)
I’ll be thinking about your post as I’m enjoying the fireworks and feeling secure knowing the evil spirits will be far away.
Happy Fourth of July.

July 2, 2019 9:18 am

This is fascinating! Love the history mixed in with the science – this post will be on my kids reading list today!

Eva Apelqvist
Eva Apelqvist
July 4, 2019 8:07 pm

What a fun, timely article. Thank you! And Happy 4th!

Nele | Navigatio (@TheNavigatio)
July 14, 2019 7:27 am

I’ve never even thought about how they work, even though I love seeing them 🙂 Interesting read, thanks for sharing!

July 14, 2019 9:30 am

Very interesting! I’ve never thought to look into how they work

July 2, 2020 6:36 am

Great post! I remember learning about this at school and it was very interesting!

Unwanted Life
July 2, 2020 7:01 am

I had no idea fireworks were packed full of pods of chemicals, I just kind of figured they just poured all the powders I to a tube a sealed it. I learnt something new again from your blog

July 2, 2020 8:35 am

This is so interesting! I never knew how fireworks worked but always loved seeing them on the Fourth of July.

Alexis Farmer
Alexis Farmer
July 2, 2020 9:41 am

So cool! I love your blog

July 2, 2020 10:01 am

This is fascinating! I have definitely learned something new! Will share 😘

The Twenty Percent
The Twenty Percent
July 2, 2020 12:03 pm

This is so interesting! I’d never considered how fireworks work before or the history behind them. Thanks for sharing 🙂

Diffusing the Tension
Diffusing the Tension
July 2, 2020 12:13 pm

This is really cool! That super hot experiment is really interesting. I personally am not a fan of fireworks, but it’s interesting how they work.

July 2, 2020 6:46 pm

This is such a great and informative post about fireworks! I honestly did not know that much about them beforehand so thank you so much for sharing all this info!

July 2, 2020 7:35 pm

Wow this is great! I too only found out the history behind fireworks this year 👀. But I still didn’t know about all the chemicals involved. The black snake is a little intimidating yet awesome. Thanks for sharing this! 😁🌴

Reply to  Susan Berk Koch
July 3, 2020 7:06 am

It was better than I could do. So it was awesome! I’ve always wished I could do science experiments like that but I was never good at science. I shall live vicariously through you! 😁🌴

Reply to  Susan Berk Koch
July 4, 2020 6:44 pm

Awww, Louie is so helpful. I love boxers. But yeah, I’m going to try this one for sure! Thank you.

Kelly Diane
July 3, 2020 3:20 am

Such an interesting post to read. I didn’t know that much about fireworks but I’ve learnt a lot.

Susan Berk Koch author

My New Book!

Be the best-informed reader!

Make Sense of Science is my email newsletter where I share information about future science, new tech developments, as well as tools and resources for STEM at home. It arrives every two weeks and you’ll only hear from me. (And Louie)

Would love your thoughts, please comment.x


Be the smartest person on your block!

Enter your email & I’ll share news about future science, STEM activities, and the best books.

And more Louie!

Louie says please subscribe to our science blog

Be the Best Informed!

I’ll make sense of science, share news about new tech, science advancements, and more. You’ll only hear from me and only twice a month. 

Louie loves STEM at home activities

Be the smartest person!

I’ll share news about future science, new species, show you how to do science at home with your kids, find the best books and more. You’ll only hear from me and only twice a month, tops.

Louie will be so happy!

Don’t miss out on More Cool Science! Subscribe for twice monthly articles. Thanks so much.