← Back to Chemistry Chemistry Cleaning

How to Make Laundry Detergent (With Calculator), According to Science

Glass jar of homemade laundry detergent powder with a wooden scoop on a shelf above a front-loading washer

Short answer: grate one bar of laundry soap and stir it into 1 cup of washing soda and 1 cup of borax. Use 2 tablespoons per load in a standard washer or 1 tablespoon in an HE machine. One batch takes 15 minutes and covers about 24 standard loads or 48 HE loads.

I have made my own laundry powder for years, and the recipe that works is the one that matches your water. The soap does the cleaning. The washing soda stops the minerals in your tap water from wrecking the soap. Get that balance wrong and towels turn stiff and gray within a few months. Below are the recipe, a calculator that scales it to your loads and water hardness, and the chemistry behind every ingredient.

At a glance

  • Time15 minutes
  • Makes24 to 48 loads
  • DifficultyEasy
  • Cost per loadWell below store detergent

What you need

  • 1 bar laundry soap, about 5 oz
  • 1 cup washing soda
  • 1 cup borax (or baking soda)
  • Box grater, large bowl and a lidded jar
  • Rubber gloves

Steps

  1. Grate the soap on the fine side of a box grater.
  2. Add the washing soda and borax.
  3. Stir until every shaving is coated.
  4. Store in a jar with a tight lid.
  5. Use 2 tablespoons per load, or 1 in an HE washer.

Adjust for your water

Hard water? Raise the washing soda to 1¼ or 1½ cups per bar. If you do not know your hardness, the jar test tells you in a minute.

This guide contains Amazon affiliate links. 33Science earns a commission on qualifying purchases. See our affiliate disclosure.

Laundry detergent calculator

Pick your recipe, machine and water hardness, then enter how many loads the batch should cover. The calculator also shows how much hardness one dose can neutralize, which decides whether homemade detergent works in your house.

Homemade laundry detergent calculator

Pick a recipe, your machine and your water, then enter how many loads you want the batch to cover.

Volumes are US cups and tablespoons, leveled. Grams assume washing soda and baking soda at 220 g per cup, borax at 210 g per cup and one 5 oz (140 g) bar of laundry soap. A kitchen scale gives the most consistent batches.

Most of the US Midwest, Southwest and Florida have hard or very hard water. The Pacific Northwest, New England and much of the Southeast have soft water. Your water utility lists its hardness in its annual water quality report.

Ingredients and tools

Bar of laundry soap, bowls of washing soda and borax, box grater, mixing bowl, measuring cups, kitchen scale and rubber gloves on a counter
Everything for one batch: soap, washing soda, borax, a grater, a bowl and a scale.

Bar laundry soap

Sodium salts of fatty acids

1 bar (5 oz / 140 g)

The cleaner. Use true soap such as Fels-Naptha, Zote or an unscented castile bar. Skip beauty bars: most are synthetic detergent bars with moisturizers that leave a film.

Washing soda

Sodium carbonate, Na2CO3

1 cup

Softens the water and raises the pH to about 11. Sold in the laundry aisle, not with the baking soda.

Borax

Sodium tetraborate, Na2B4O7·10H2O

1 cup, optional

Holds the pH steady and helps keep dirt suspended. Swap in baking soda for a borax-free batch.

Make washing soda from baking soda

Out of washing soda? Bake baking soda on a tray at 400 °F (200 °C) for an hour. Heat drives off water and carbon dioxide: 2NaHCO3 → Na2CO3 + H2O + CO2. The powder turns grainier and loses about a third of its weight.

Tools

  • A box grater, or a food processor with a grating disc
  • A large mixing bowl and a spoon
  • Measuring cups, or a kitchen scale for repeatable batches
  • Rubber gloves. Washing soda is strongly alkaline and dries out skin.
  • A jar with a tight lid for powder, or a 2 gallon bucket and jugs for liquid

How to make powder laundry detergent

Hands grating a bar of yellow laundry soap on a box grater into a steel bowl
Grate on the fine side. Fine shavings dissolve; coarse ones leave flecks on dark clothes.
  1. Grate the soap finely. Use the smallest holes that do not clog. Fine flakes have more surface area and dissolve faster in the wash. If the bar is soft and gums up the grater, leave it unwrapped for a few days to dry out.
  2. Measure the powders. Put on gloves and add the washing soda and borax (or baking soda) to the bowl. Use the amounts from the calculator.
  3. Mix until even. Stir for a minute, breaking up clumps of soap. For the finest texture, pulse the batch in a food processor for 20 seconds and let the dust settle before you open the lid.
  4. Store it dry. Pour the mix into a jar with a lid. Washing soda pulls moisture from the air and sets into hard lumps if left open. Keep a tablespoon in the jar.
Glass jar of homemade laundry detergent powder with a wooden scoop on a shelf above a front-loading washer
A finished batch. A lidded jar keeps the washing soda from caking.

How to make liquid laundry detergent

The liquid version uses the same ingredients dissolved in water. It takes more effort and dissolves instantly in cold washes, which is its main advantage. For each gallon of finished detergent:

  1. Melt the soap. Heat 4 cups of water until steaming. Add 1 grated bar of soap and stir over low heat until no flakes remain, about 10 minutes. Keep it below a hard boil or it foams over.
  2. Add the powders. Stir in 1 cup of washing soda (adjust for your water with the calculator) and ½ cup of borax until dissolved. The mix thickens as you stir.
  3. Dilute. Pour 6 cups of hot tap water into a bucket, add the soap mix, then add cold water to reach 1 gallon (16 cups). Stir.
  4. Let it set overnight. The liquid turns into a lumpy gel as the soap molecules pack into large structures while it cools. This is normal.
  5. Break it up and bottle. Stir or use a stick blender to smooth it out, then pour it into jugs. Shake before each use.
Bucket of homemade liquid laundry detergent set into a lumpy gel, stirred with a wooden spoon, an empty jug beside it
The morning after: liquid detergent sets into a gel. Stir it smooth before bottling.

Crystals in the jug

White crystals at the bottom of the jug in a cold garage are washing soda coming out of solution. Warm the jug and shake it.

How much to use per load

MachinePowderLiquidExtra for heavy soil
Standard top-loader2 tbsp½ cup+1 tbsp washing soda
HE front-loader or HE top-loader1 tbsp¼ cup+1 tsp washing soda
Hand washing (1 gallon basin)1 tsp, dissolved first1 tbspSoak 30 minutes

Do not overdose

More is not better. Soap that finds no dirt or hardness to bind with stays in the fabric. If clothes feel waxy or smell sour after drying, cut the dose by a third.

For a cold wash, dissolve the powder in a cup of hot tap water first. Laundry soap made from tallow dissolves poorly below about 70 °F (21 °C), and undissolved flakes stick to dark fabric.

Test your water hardness at home

Water hardness is the amount of dissolved calcium and magnesium, reported as milligrams of calcium carbonate per liter (the same as parts per million). The US Geological Survey groups it like this:

ClassHardness (mg/L as CaCO3)Grains per gallon
Soft0 to 600 to 3.5
Moderately hard61 to 1203.5 to 7
Hard121 to 1807 to 10.5
Very hardOver 180Over 10.5

Water hardness test strips give a number in seconds. With no strips, a soap jar test shows the same thing:

  1. Fill two jars. One halfway with tap water, one with distilled water. The distilled jar is your control.
  2. Add soap. The same small pinch of grated soap, or 10 drops of liquid castile soap, to each.
  3. Shake. Close the lids and shake both hard for 10 seconds.
  4. Compare. Soft water gives a tall, lasting foam over clear water, like the control. Hard water gives little foam and turns cloudy.
Two glass jars of soapy water: the left with thick foam over clear water, the right cloudy with little foam
Same soap, two waters. Soft water on the left foams. Hard water on the right turns the soap into cloudy scum.

The cloudiness in the hard water jar is calcium soap, the gray scum that rings a bathtub. In a washing machine it settles into fabric instead. Add a pinch of washing soda to the hard water jar, shake again and the foam comes back. That is why washing soda is in the recipe.

The science: how homemade detergent cleans

In three sentences

Soap pulls oil off fabric. Washing soda removes the calcium in your water before it can ruin the soap. Borax holds the pH where soap works best.

Soap molecules grab oil and water at the same time

Soap is made by reacting fats or oils with lye (sodium hydroxide), a reaction called saponification. The product is a sodium salt of a fatty acid, such as sodium stearate. Each molecule has a hydrocarbon tail 12 to 18 carbons long that dissolves in oil, and a charged carboxylate head (COO−) that dissolves in water.

In the wash, the tails bury themselves in the film of skin oil and grease that holds dirt on fabric. The heads stay in the water. Agitation tears the oil into tiny droplets, each wrapped in a shell of soap molecules with their charged heads facing out. These structures are called micelles. Every micelle carries the same negative charge on its surface, so they repel each other and the fabric, and the oil stays suspended until the rinse carries it away.

Hard water turns soap into scum

Calcium and magnesium ions in tap water carry a charge of +2. Each one binds two soap molecules into an insoluble salt:

2 C17H35COO− + Ca2+ → (C17H35COO)2Ca (calcium stearate, soap scum)

Every soap molecule caught this way is lost for cleaning, and the waxy calcium stearate lodges between fibers. This is what makes towels stiff, whites gray and dark clothes dull after months of washing with plain soap in hard water.

Washing soda removes the hardness first

Sodium carbonate dissolves into carbonate ions that react with calcium faster and more completely than soap does. The calcium drops out as fine calcium carbonate, the same mineral as chalk and limescale, which rinses away:

Ca2+ + CO32− → CaCO3 (chalk)

The ratio is one to one: 106 g of sodium carbonate removes the equivalent of 100 g of calcium carbonate hardness. A 55 liter wash at 150 mg/L carries 8.3 g of hardness, which takes about 8.8 g of washing soda to clear. That is the calculation the calculator runs for your water.

Washing soda also raises the pH of the wash to about 11. At that pH, the fatty acids in body oil and food grease turn into soap themselves, so the dirt helps clean itself off. The high pH also swells cotton fibers slightly, loosening trapped soil.

Borax steadies the pH

In water, borax forms a mix of boric acid and borate ions that acts as a buffer near pH 9.2. A buffer resists change: acidic soils such as sweat would otherwise lower the pH, and soap cleans poorly once the pH falls below about 8. Borax also helps keep loosened dirt suspended.

Borax does less than its reputation. It does not turn water into hydrogen peroxide, a claim that comes from confusing it with sodium perborate, a different chemical used in older bleach powders. For whitening, add a tablespoon of sodium percarbonate (oxygen bleach) to the drum. It releases hydrogen peroxide when it dissolves and works best in water above 104 °F (40 °C).

Why some soaps fail in cold water

A soap dissolves only above a temperature called its Krafft point. Soaps made from saturated fats with long chains, such as tallow (mostly stearate and palmitate), have Krafft points well above room temperature when pure. Real tallow soaps are mixtures and dissolve slowly in a cold wash, leaving flakes behind. Soaps from coconut oil (laurate, 12 carbons) and olive oil (oleate, with a kink in the chain) dissolve in cold water. If you wash cold, choose a coconut-based laundry bar or castile soap, or switch to the liquid version.

Homemade vs store-bought detergent

Commercial laundry detergent is not soap. Its main cleaners are synthetic surfactants such as linear alkylbenzene sulfonate. Their calcium salts stay far more soluble than calcium soap, and store detergents add builders that tie up the rest of the hardness, so they keep working in hard water. That is why detergents replaced soap for laundry after World War II.

FeatureHomemade (soap based)Store-bought detergent
Main cleanerSoap (fatty acid salts)Synthetic surfactants
Hard waterNeeds washing soda to workTolerates it
Cold waterDepends on the soap; tallow soaps struggleFormulated for cold
Enzymes for protein, starch and grease stainsNoneUsually several
Optical brightenersNoneCommon
Fragrance and dyesOnly what you addCommon, with free-and-clear options
Residue over timePossible in hard waterLow
Cost per loadLowerHigher

The missing enzymes are the biggest practical gap. Proteases digest blood, egg and grass stains, amylases digest starch and lipases break down grease. A homemade mix cannot match them on those stains. Pretreat them with a paste of water and washing soda, or keep a small bottle of enzyme stain remover for the tough ones.

Where it works best

Homemade detergent works well for everyday loads with light soil: sheets, towels, t-shirts and cloth napkins. It is a poor fit for heavily stained work clothes, and for very hard water unless you adjust the recipe.

Troubleshooting

ProblemCauseFix
Towels stiff or scratchyCalcium soap building up in the fibersRaise the washing soda. Add ½ cup white vinegar to the rinse.
Whites turning graySoap scum and redeposited dirtRaise the washing soda. Add oxygen bleach to white loads.
White flecks on dark clothesUndissolved soapGrate finer, dissolve in hot water first or switch to liquid.
Sour smell after dryingToo much soap left in fabricCut the dose by a third. Run one hot wash with no detergent.
Powder is a solid lumpWashing soda absorbed moistureBreak it up and store in a sealed jar.
Liquid separated into water and gelNormal settlingShake or stir before each use.
Musty smell in an HE washerSoap residue in the door sealRun a hot cleaning cycle with 1 cup washing soda once a month. Leave the door open.

To strip months of buildup from towels, soak them for 4 hours in a bathtub of hot water with ¼ cup each of washing soda and borax, then wash with no detergent. The gray water that comes out is old soap and minerals.

Vinegar goes in the rinse

Do not add vinegar to the same wash as the powder. The acid reacts with the carbonate, fizzes off as carbon dioxide and cancels the washing soda. Vinegar belongs in the rinse dispenser.

Safety

Before you mix

  • Label the jar and keep it out of reach. White powder in the laundry room looks like sugar to a child.
  • Washing soda irritates eyes. A 1% solution sits near pH 11. Wear gloves when mixing and rinse splashes with water for 15 minutes.
  • Do not eat borax or give it to pets. The European Union classifies borax as toxic to reproduction (Category 1B) based on high-dose animal studies. Laundry use exposes you to very little.
  • Avoid the dust. Open the food processor only after the dust settles, and pour slowly.
  • Keep chlorine bleach separate. Bleach and acids, including vinegar, release chlorine gas. Add bleach only through the machine’s bleach dispenser.

Homemade soap detergent is safe for septic systems at normal doses. Soap is biodegradable, and a load adds a few grams of carbonate and borate. For cloth diapers, follow the diaper maker’s guidance, since soap residue reduces absorbency.

The same hard water chemistry decides whether soap works at the kitchen sink. Our guide to how to make dish soap has a calculator that checks your water.

Frequently asked questions

Does homemade laundry detergent actually work?

Yes, for everyday loads with light soil. Soap removes body oil and dirt well as long as washing soda has softened the water first. It does not match store detergent on protein and starch stains, because it has no enzymes.

Is homemade laundry detergent safe for HE washers?

Yes at 1 tablespoon of powder or 1/4 cup of liquid per load. Soap makes little foam with washing soda in the mix. Run a monthly hot cleaning cycle to clear any soap residue from the drum and door seal.

What can I use instead of borax?

Baking soda, in the same amount. Borax buffers the pH, and baking soda does a weaker version of the same job. You can also leave it out and add 1/4 cup more washing soda per batch.

Why are my clothes stiff after using homemade detergent?

Calcium and magnesium in hard water turn soap into insoluble calcium soap that stays in the fibers. Increase the washing soda in the recipe and add 1/2 cup of white vinegar to the rinse.

Can I use dish soap to make laundry detergent?

No. Dish soap is a synthetic detergent made to foam, and even a small amount overflows a washing machine with suds. It can also damage the pump in an HE washer.

Does homemade laundry detergent work in cold water?

The liquid version does. Powder made with tallow-based laundry bars dissolves poorly below about 70°F, so dissolve each dose in a cup of hot tap water first or use a coconut-oil or castile bar.

How much homemade laundry detergent do I use per load?

2 tablespoons of powder or 1/2 cup of liquid in a standard washer. Use half that in an HE machine.

Is washing soda the same as baking soda?

No. Washing soda is sodium carbonate, with a pH near 11. Baking soda is sodium bicarbonate, with a pH near 8.3. Heating baking soda at 400°F for an hour converts it to washing soda.

Is borax safe in laundry?

Used as a laundry additive and rinsed out, borax exposes you to very little. It is harmful if swallowed and the EU classifies it as a reproductive toxicant at high doses, so store it out of reach of children and pets.

How long does homemade laundry detergent last?

Powder keeps indefinitely in a sealed jar. Liquid lasts several months; it may separate but rarely spoils, since its high pH keeps most bacteria from growing.

Sources

Avatar photo

Dr. Maya Patel

PhD in Particle Physics from Imperial College London, followed by five years at CERN working on detector calibration. Left the lab to write full-time after realizing she spent more hours explaining her research to friends than actually running it. Has reported from accelerator facilities, telescope arrays, and chemistry labs on four continents. Treats every discovery as a story that deserves an audience beyond the people who made it.

Post navigation