Jump to main content

The Chemistry of Clean: Make Your Own Soap to Study Soap Synthesis

402 reviews


Soap comes in many varieties and forms—from bars to bottles to boxes. The uses for soaps are just as expansive—from cleaning our hands, hair, and faces to a variety of household cleaning jobs, such as dishes or laundry. One thing all these different soaps have in common is their chemical origin; they were all made by mixing fat or oil with a strongly basic solution, such as lye. In this chemistry science project, you will carry out the chemical steps needed to transform coconut oil into a usable bar of soap, and purify it with salt to measure how its pH changes with its purity.


Areas of Science
Time Required
Average (6-10 days)
This procedure should be done in a chemistry lab with adult supervision.
Material Availability
Some specialty items are needed; see the Materials and Equipment list for details.
High ($100 - $150)
Minor injury is possible. This procedure requires use of sodium hydroxide solution. Sodium hydroxide can burn skin and eyes. See the Experimental Procedure for important cautionary notes. Adult supervision is required.

David B. Whyte, PhD, Science Buddies


Make your own soap by mixing coconut oil with sodium hydroxide and demonstrate increased soap purity as you follow steps to purify it with salt (sodium chloride).


It's not clear who first invented soap. There are documents suggesting that it was used by ancient Phoenicians over 5,000 years ago. Substances believed to be soaps have been found in ancient Egyptian ruins. It might have been invented independently in several regions at different times. An intriguing story about how the Romans learned to make soap involves the tradition of sacrificing animals on Mount Sapo. Parts of the sacrificed animals were burned as offerings to the gods. Fats from the burnt animal flesh mixed with ashes from the fires. When it rained, the Roman's noticed that a substance formed in the pools of water that ran from the ashes that had been mixed with the animal fats. Upon experimentation, they learned that this new substance, later called soap, had useful properties, including the ability to clean surfaces. Chemists now refer to the chemical reaction for making soap as saponification, in honor of the discovery on Mount Sapo.

Soap is formed by mixing fats or oils with strong bases, such as sodium hydroxide. Sodium hydroxide is also called lye. The traditional way to make lye is to leach ashes with water. The ashes contain substantial amounts of sodium hydroxide, which dissolves in the water, forming a solution of sodium hydroxide. Before soap became available from large companies, people made their own by mixing animal fats with lye in a pot and boiling it. You could tell when it was "done" by taking a small amount of the mixture and adding it to some clean water. If there were droplets of fat on the surface of the water, the reaction was incomplete. More lye was added and the reaction continued. It was later discovered that the soap could be purified by adding salt to it. The addition of salt caused the soap to form a solid that excluded impurities, such as the sodium hydroxide. This soap was milder and suitable not just for washing clothes or pots, but also for use on skin. The figure shows the chemical reaction that is the basis for soap synthesis.

Diagram of saponification of a fat molecule.

The bonds that connect the long chains of the fat molecule to the "backbone" are broken by the reaction of sodium hydroxide (and heat), yielding glycerol and three fatty-acid molecules (soap). The "acid" part of the fatty acid is the side with the oxygen (O) atoms. The fatty part is the long chain of carbons, shown here as the crooked lines. This end mixes well with fats and oils. In the second step, the fatty acids are converted into relatively pure fatty-acid salts by the addition of sodium chloride.

Figure 1. Saponification of a fat molecule. The bonds that connect the long chains of the fat molecule to the "backbone" are broken by the reaction of sodium hydroxide (and heat), yielding glycerol and three fatty-acid molecules (soap). The "acid" part of the fatty acid is the side with the oxygen (O) atoms. This end mixes well with water. The fatty part is the long chain of carbons, shown here as the crooked lines. This end mixes well with fats and oils. In the second step, the fatty acids are converted into relatively pure fatty-acid salts by the addition of sodium chloride.

Now to explain, chemically, how soap works to clean things. Fats mixed with strong bases are hydrolyzed into fatty acids. Fatty acids have the very useful property of having one end that mixes well with water (it is hydrophilic, or "water-loving") and another end that mixes well with oils and fats (it is hydrophobic, or "water-hating"). The part that mixes well with water is the "acid" part. The part that mixes well with fats is the "fatty" part. This dual nature allows soaps to dissolve fat, grease, and dirt in water. Without soap, oil and water don't mix. With soap, they do.

The addition of salt (sodium chloride) to the crude form of soap forms fatty-acid salts. The sodium ions from the sodium chloride bond with the fatty acid, forming a product that is less soluble in water. Because of this reduced solubility, the soap leaves the solution and forms a solid mass. This process of "dropping" out of the solution is called precipitation. Precipitation is a great way to purify something because it separates the chemical you want (soap) from a crude mixture containing chemicals you do not want. You can imagine that a mixture of animal fat and leached ashes that has been boiled for some time might have some unpleasant byproducts! Salt precipitation of the soap leaves these behind.

Soap can be made from oils and fats derived from plants, as well as from animals. In this chemistry science project, you will synthesize soap from coconut oil. The soap will be purified by three rounds of salt purification. You will track the purity of the soap by measuring its pH after each salt-precipitation step. As more sodium hydroxide is removed, the pH will become lower. If that statement doesn't make sense to you, look back at the reaction in Figure 1 and read our Acids, Bases, & the pH Scale help guide. At the end of the experiment, you will add some fragrance and you'll have your own homemade soap!

Terms and Concepts



Materials and Equipment

Disclaimer: Science Buddies participates in affiliate programs with Home Science Tools, Amazon.com, Carolina Biological, and Jameco Electronics. Proceeds from the affiliate programs help support Science Buddies, a 501(c)(3) public charity, and keep our resources free for everyone. Our top priority is student learning. If you have any comments (positive or negative) related to purchases you've made for science projects from recommendations on our site, please let us know. Write to us at scibuddy@sciencebuddies.org.

Experimental Procedure

Caution: This procedure requires use of sodium hydroxide solution and should be performed in a chemistry lab, under adult supervision.
  • Sodium hydroxide can burn the skin and the eyes. Do not wear contact lenses when working with the sodium hydroxide solution since this increases chance of injury if the sodium hydroxide splashes in your eyes.
  • Be sure to wear safety goggles, gloves, and a lab coat or apron.
  • If sodium hydroxide splashes onto your skin, wash immediately with plenty of water.
  • If it splashes in your eyes, immediately flush them with plenty of water for at least 15 minutes and contact a physician.
  • Remove clothing splashed with sodium hydroxide immediately and wash it before reuse.

Performing the Experiment

  1. Put on your lab coat, gloves, and safety goggles.
  2. Place 10 mL of coconut oil and 15 mL of 3-M sodium hydroxide solution into a 100-mL beaker.
  3. Using a hotplate or a low-flame Bunsen burner, heat the mixture to a gentle boil.
    1. Use the wire gauze to stabilize the beaker on the hotplate if it is the kind with a spiral heating coil.
  4. Stir constantly. Avoid spattering of the sodium hydroxide solution by using gentle heating and by stirring constantly.
  5. Boil for 20 minutes, or until all of the water has evaporated.
  6. Carefully remove this beaker from the heat and allow it to cool.
  7. Using the pH paper, test the pH of the crude soap.
    1. For steps where the soap is still a liquid, the pH can be measured by simply dipping the pH paper into the liquid. Follow the instructions on the pH paper package to interpret the results.
    2. For steps where the soap is a solid, it may be wet enough to just rub the pH paper against the soap. If it is not, then add 3-5 drops of water and then rub the pH paper onto these soap-water drops. Follow the instructions on the pH paper package to interpret the results.
    3. If you are unfamiliar with what the pH scale is or what it means, read the Science Buddies guide to Acids, Bases, & the pH Scale.
  8. Record the pH in your lab notebook. Call it Crude soap.
  9. Add 15 mL of distilled water to the soap mixture and stir it with a stirring rod.
  10. Heat 50 mL of saturated sodium chloride solution in a 100-mL beaker until it is almost boiling.
    1. If you are starting with solid sodium chloride (rather than liquid), weigh 15 g of sodium chloride and put it in a 100-mL beaker.
    2. Add 50 mL of water and stir until dissolved.
    3. Heat the salt solution until it is almost boiling.
  11. Add the hot sodium chloride solution to the soap mixture. Use a hot pad or oven mitt, as needed.
  12. Break up lumps of soap with a clean stirring rod.
  13. Cover the beaker containing the soap mixture with cheesecloth and pour the liquid into a clear plastic cup. This is called decanting the liquid.
    1. Cheesecloth is made of a very fine mesh allowing for the excess liquid to drain out while retaining all the solids. The solids are the soap.
    2. You want to keep the material left in the beaker after you decant the liquid. Those solids are the soap.
  14. Measure the pH of the soap with a new pH paper. See step 7b for instructions on how to measure the pH of solid soap.
  15. Record the pH in your lab notebook. Call it Washed 1 time.
  16. Repeat steps 9–14 two more times.
  17. Record the pH after each wash. Call the pH readings Washed 2 times and Washed 3 times.
  18. Add three drops of peppermint oil to the soap.
  19. Press the soap between two pieces of filter paper to remove as much liquid as possible.
  20. Press the soap into the soap mold and dry it overnight.
  21. Measure and record the pH reading of the dried soap. Call the pH reading Final product.
  22. If the Final product pH reading is between 6 and 10, the soap is considered safe to use. If this is the case, take the soap out of the mold and confirm its ability to produce suds by washing your hands with it. Did the procedure successfully convert fat into soap?
  23. Record you observations about the color, odor, and texture of the soap in your lab notebook.
  24. Perform the entire procedure two more times with clean and fresh materials to collect additional data and to demonstrate that your results are repeatable.

Graphing Your Data

  1. Average the pH readings (crude and washes 1–3) for each trial.
  2. Graph the number of salt washes on the x-axis and the average pH readings on the y-axis.
  3. How does the ph change with more washes? Why?
icon scientific method

Ask an Expert

Do you have specific questions about your science project? Our team of volunteer scientists can help. Our Experts won't do the work for you, but they will make suggestions, offer guidance, and help you troubleshoot.


  • Measure the pH of the liquid that was decanted and add this data to your presentation.
  • Vary the time that the oil and sodium hydroxide are boiled. Graph the weight of soap produced vs. the time of boiling.
  • Vary the temperature at which the oil and sodium hydroxide react. Keep the time constant. Graph the weight of soap produced vs. temperature.
  • Determine how soap made with complete saponification differs from soap made with partial saponification (that is, with some oil still in the soap in the form of triglycerides).


If you like this project, you might enjoy exploring these related careers:

Career Profile
Chemical engineers solve the problems that affect our everyday lives by applying the principles of chemistry. If you enjoy working in a chemistry laboratory and are interested in developing useful products for people, then a career as a chemical engineer might be in your future. Read more
Career Profile
Everything in the environment, whether naturally occurring or of human design, is composed of chemicals. Chemists search for and use new knowledge about chemicals to develop new processes or products. Read more
Career Profile
The role that the chemical technician plays is the backbone of every chemical, semiconductor, and pharmaceutical manufacturing operation. Chemical technicians conduct experiments, record data, and help to implement new processes and procedures in the laboratory. If you enjoy hands-on work, then you might be interested in the career of a chemical technician. Read more

News Feed on This Topic

, ,

Cite This Page

General citation information is provided here. Be sure to check the formatting, including capitalization, for the method you are using and update your citation, as needed.

MLA Style

Science Buddies Staff. "The Chemistry of Clean: Make Your Own Soap to Study Soap Synthesis." Science Buddies, 3 Mar. 2022, https://www.sciencebuddies.org/science-fair-projects/project-ideas/Chem_p096/chemistry/how-to-make-soap. Accessed 9 Dec. 2023.

APA Style

Science Buddies Staff. (2022, March 3). The Chemistry of Clean: Make Your Own Soap to Study Soap Synthesis. Retrieved from https://www.sciencebuddies.org/science-fair-projects/project-ideas/Chem_p096/chemistry/how-to-make-soap

Last edit date: 2022-03-03
Free science fair projects.