Reddit user thefingolfin says:
"It only took me about an hour to make a powdered detergent from Borax, washing soda, and bar soap (one cup, one cup, and ½ bar respectively). There are tons of recipes. This is the one I used. The rough cost estimates for me were 900 loads for about $20. Cheapest equivalent was Aldi's detergent at 360 loads for $25."