Being a mother is often a thankless job.

Feed the kids. Do the laundry. Ferry the kids to soccer practice. Build that science project. Make homemade gluten-, sugar- and nut-free brownies for the bake sale.

It just goes on and on. So it’s not surprising that some of those overworked ladies might have a breaking point.

That’s exactly what happens to mother-of-two Amy (Mila Kunis) in the raunchy, fun and endearing comedy “Bad Moms.”

Things aren’t going well for Amy. She catches her slacker husband Mike cheating with a naked woman online, her kids don’t appreciate her, her part-time job at a fancy coffee company run by millennials has full-time hours and the uber-mom and PTA head Gwendolyn (Christina Applegate) is making her life miserable.

She finds solace in two fellow moms: Kiki (Kristen Bell), with four kids and a controlling husband, and vulgar single mom Carla (played by the great character actress Kathryn Hahn, who should get a ton of work from this performance).

The movie kind of follows the model of “Mean Girls,” where a trio of outcasts takes aim at the trio of alpha females, here led by Gwendolyn and her lackeys (Jada Pinkett Smith and Annie Mumolo). They run the school, terrorizing coaches and making the other moms live in fear.

The writer/director duo of Jon Lucas and Scott Moore — who wrote the original “Hangover” film — bring a similar comedy style to “Bad Moms,” with vicious, raunchy humor and lots of raucous behavior.

The movie celebrates mothers, and many of the men are weak, childish or both (with the exception of Jay Hernandez’s hot widowed dad Jessie).

It’s a nice change of pace to see moms get a chance to break loose, and be just as bawdy as the guys.