ComparisonOrganic chemistry

Soap vs Detergent: What Is the Difference in Chemistry?

Scheme of a micelle, a ball of soap or detergent molecules with water-loving heads outward and grease-loving tails inward
Scheme of a micelle, a ball of soap or detergent molecules with water-loving heads outward and grease-loving tails inward. Image: SuperManu (CC BY-SA 3.0), via Wikimedia Commons

Soap is made from natural fats or oils reacted with a strong base, while detergents are synthetic cleaners usually made from petrochemicals. Both clean by forming micelles around grease, but the main practical difference is that detergents do not form scum in hard water as soap does.

Soap vs Detergent at a glance

FeatureSoapDetergent
Raw materialsAnimal or plant fats and oils, plus sodium or potassium hydroxideMainly petrochemicals from crude oil, plus sulfuric acid or sulfur trioxide in making some types
Chemical familySalts of fatty acids, such as sodium stearate, C17H35COONaSynthetic surfactants, such as sodium lauryl sulfate or linear alkylbenzene sulfonates
Water-loving headCarboxylate group, –COO⁻Sulfate or sulfonate group, –OSO3⁻ or –SO3⁻
Behavior in hard waterReacts with calcium and magnesium ions to form scumCalcium and magnesium salts stay dissolved, so little scum forms
Typical pH of solutionAlkaline, usually around pH 9 to 10Can be near neutral or mildly alkaline, depending on the formula
BiodegradabilityBiodegrades readilyModern linear detergents biodegrade; older branched types did not

The main difference

Soap and detergent are both surfactants, which means surface-active agents. Each molecule has two parts. One end is a water-loving head that dissolves in water, and the other is a long, grease-loving tail that avoids water and sticks to oil. This double nature lets them link water and grease, which normally do not mix.

The difference lies in where the molecules come from. Soap is a salt of a fatty acid, made by heating animal or plant fats with a strong base such as sodium hydroxide. This reaction, called saponification, is one of the oldest chemical processes people used. Detergents are made in chemical plants from hydrocarbons that come mainly from crude oil, and their heads are sulfonate or sulfate groups instead of carboxylate groups.

Because of this, soap and detergent behave differently in some conditions. The soap head is a carboxylate group, COO⁻, which reacts with the metal ions found in hard water. Detergent heads are less likely to do this, so detergents work better in cold water, in hard water and in acidic conditions where soap would be less effective.

Chemistry of soap and hard water

In the traditional process, a fat or oil, which is a triglyceride with three fatty acid chains attached to a glycerol backbone, is heated with a strong base. The word equation is fat or oil + sodium hydroxide → glycerol + soap. The base breaks the bonds that hold the fatty acids to the glycerol, so the glycerol is released and the fatty acids become sodium salts. This reaction is called saponification, from the Latin for soap.

Soap works because its sodium or potassium salts dissolve in water as ions, and the fatty acid tails form micelles. Hard water is water that contains dissolved calcium and magnesium ions, often from limestone or chalk rock. Those ions are doubly charged and bind strongly to the carboxylate heads of soap.

The reaction forms calcium or magnesium salts of the fatty acids. These salts are insoluble in water, so they come out of solution as a white, sticky solid. This is scum, the gray film in a bath or the residue in a washing machine. Soap is used up as it forms scum, which means more soap is needed to get the same cleaning effect in hard water.

Detergents avoid this problem because their calcium and magnesium salts are more soluble. They stay dissolved, so there is less scum and the detergent remains active for cleaning. This is why many hard-water areas use detergents in laundry and dishwashers, and why shampoo, which is mostly a detergent, rinses cleanly.

Micelles and how both clean

When soap or detergent is added to water, the molecules gather at the surface and then form micelles. A micelle is a roughly spherical cluster of molecules in which the tails point inward and the heads point outward toward the water. Grease and oil dissolve inside the cluster, and the micelle carries them away as the water is rinsed.

This is why both substances clean. Greasy dirt, such as cooking oil on a plate or sebum on skin, sits in the tails rather than in the water. The micelle surrounds it, and the dirt is washed off. Detergents also reduce the surface tension of water more strongly in many cases, which helps the water spread into fabric and between dirt particles.

Rinsing finishes the job. Once the micelles are carried away with the water, the grease is gone, and the remaining soap or detergent is washed out. Any residue left on fabric or dishes can attract dirt, so thorough rinsing matters as much as the cleaning step itself. This is also why cleaning products are designed to foam less in washing machines that rinse well.

Each of these steps depends on concentration. Micelles only form above a certain concentration called the critical micelle concentration. Below that point, the molecules stay as single units and clean less effectively. This is one reason why a little soap in a large volume of water does not clean well.

Comparing the two in everyday use

Soap is common in bars for hands and bodies, where it is gentle and biodegrades readily. Its alkalinity, usually around pH 9 to 10, can be harsh on very dry skin, which is one reason skin-care products often use synthetic cleansers. Soap is also used in soap-based lubricants and in some traditional laundry products.

Many products sold as bars of soap are not soap at all. So-called syndet bars, short for synthetic detergent, use synthetic surfactants and are often labeled as beauty bars. They are milder on the skin and do not form scum in hard water, which is why they are popular in areas with hard water.

Detergents are the main cleaners for clothes, dishes and many household surfaces. Their chemistry can be tuned for different uses, including greasy kitchens, cold-water washing and hard water. Older branched alkylbenzene sulfonates resisted breakdown in rivers and caused foaming in the 1950s and 1960s, so manufacturers switched to linear molecules that biodegrade much more easily.

How to tell them apart in practice

Ask what the product is made from and how it behaves with hard water. A bar that leaves a gray film on the bath, or a solution that forms a white curd when mixed with hard water, is most likely soap. A product that foams well without leaving scum, and whose label names sodium lauryl sulfate or a similar synthetic surfactant, is most likely a detergent.

Chemists also use the concept of acidity to explain soap. Because soap is the salt of a weak acid, a fatty acid, and a strong base, its solution is alkaline. In acidic conditions the carboxylate groups pick up hydrogen ions and turn back into fatty acids, which are insoluble and do not clean well. This is why soap works poorly in acidic cleaners and why detergents are used in some acidic formulas. Chemistry topics such as acids and bases and solubility and salts explain these behaviors in more detail, and the metal ions involved in hard water include calcium.

Soap is made with a strong base such as sodium hydroxide, which is corrosive. That is why soap-making should be left to trained professionals and not attempted at home. Store-bought soap and detergent are safe to use as directed, so follow the label on the package and do not mix cleaning products together.

Frequently asked questions

What is the main difference between soap and detergent?

Soap is made from natural fats or oils reacted with a strong base, so it is a salt of a fatty acid. Detergents are synthetic surfactants usually made from petrochemicals, and they can be designed to work in hard water.

Why does soap leave scum in hard water?

Hard water contains calcium and magnesium ions. These react with soap to form insoluble salts that float as a sticky scum or stick to surfaces, while detergents form salts that stay dissolved.

Do soap and detergent clean in the same way?

Yes. Both have a molecule with a water-loving head and a grease-loving tail. They gather around grease in water as micelles, which lift the oil away so that it can be rinsed off.

Is soap better for the environment than detergent?

Neither is automatically better. Soap biodegrades readily, and modern detergents also biodegrade, but the older branched detergents did not, which caused foaming in rivers in the twentieth century.

What is a micelle?

A micelle is a roughly spherical cluster of soap or detergent molecules in water. The tails point inward, away from the water, and the heads point outward, so grease can dissolve in the middle of the cluster.

Sources and further reading

  • OpenStax, "Chemistry 2e"
  • Royal Society of Chemistry, "Soap and Detergents"
  • W. M. Haynes (ed.), "CRC Handbook of Chemistry and Physics"

Cite this page

“Soap vs Detergent: What Is the Difference in Chemistry?.” Atoms & Forces, https://science.bigworldlist.com/compare/soap-vs-detergent/.

More about Base