Welcome to PopSci’s at-home science projects series. On weekdays at noon, we’ll be posting new projects that use ingredients you can buy at the grocery store. Show us how it went by tagging your project on social media using #popsciprojects.

The air we breathe every day is full of moisture—even in the desert. Under the right conditions, that moisture will form clouds, which may eventually let loose some rain. It’s almost magical, so it’s no surprise that cultures around the world have rain deities and that precipitation has been used to powerful effect in movies, music, and other forms of art.

But there’s nothing mystical about it, and this project does a great job illustrating the basic science behind those dreary drizzles, refreshing summer storms, and torrential downpours.

It’s a simple demonstration, but there’s one key note: Don’t use shaving gel. Shaving gel isn’t as fluffy as shaving cream and it won’t cover the surface of the water properly. Plus, cream is thick and white, so it’s essentially a cloud in a can.


  • Time: 5-10 minutes
  • Difficulty: easy

What you’ll need:

  • A tall, clear drinking glass
  • Shaving cream
  • Food coloring
  • A bowl, cup, or other small container
  • A spoon
  • Water


a photo of a person spraying shaving cream into a glass of water for a science project experiment creating a storm in a glass
Cloud creation has never been simpler. John Kennedy

1. Fill the glass halfway with water.

2. Spray shaving cream onto the water. Keep going until you have a layer of cream about 1-1.5 inches thick. You should also leave at least an inch of space between the top of the cream and the top of the glass. If you don’t, everything will eventually overflow.

3. Smooth the shaving cream with your finger. Make sure the cream completely covers the surface of the water and there are no gaps at the top of the layer, either. You don’t want the dye to simply fall through to the water below—you want your “rain” to work for it.

4. Mix the food coloring and water in your second container. Pour between half a cup and one full cup of water into your second container. The exact amount does not matter. Then, add about half a teaspoon of food coloring. Again, the exact amount does not matter—use as much as you want until you get a color you like.

5. Add the colored water. Use your spoon to pour the colored water onto the top of the shaving cream. Go slowly so you don’t overwhelm the cream too quickly.

a photo of a person adding colored water with a spoon to a glass full of water and shaving cream as part of a science project experiment creating a storm in a glass
It’s going to be a blue storm today. John Kennedy

6. STORM. As you add dye to the shaving cream, you may see it begin to push through the “cloud layer” on the sides of the glass. Eventually, it will dramatically burst through and pour into the water below.

How it works

Clouds and precipitation are dependent on airborne water vapor. It’s as simple as that. “The more moisture you have in the atmosphere, the more likely you’re going to see clouds form,” says Dan Kottlowski, senior meteorologist at “A cloud is nothing more than billions and billions of very tiny water particles.”

But just because you see clouds doesn’t mean rain is coming. If there’s a relatively shallow layer of moisture in the atmosphere (still a few thousand feet thick), those clouds may drift on by without dropping anything on the land below. In fact, they may need several thousand more feet of moisture before precipitation occurs, Kottlowski says.

This project demonstrates that quite clearly, as a few spoonfuls of colored water on top of the shaving cream isn’t nearly enough to push through to the water below. Once it reaches a point where it’s too heavy for the cream, though, everything breaks loose.

In the real world, however, precipitation isn’t simply caused by adding more and more moisture to a cloud. There needs to be a trigger, and that’s where condensation nuclei come in. These could be dust or salt particles, or even insects, Kottlowski says.

Once those disturb the clouds a little bit and cause the water to condense, the heavens open up, as they say. Those particles don’t have to be present for the duration of a storm—just to start it, Kottlowski says.

Now, there aren’t technically any particles affecting the shaving cream “cloud” in this project. Even if a hapless fly gets trapped in it, it’s not the same. Still, the erosive force of the water hitting the cream with every spoonful may have a similar effect, disturbing the cream and getting it to accumulate in one area—enough to start the colorful “rainwater” falling.