Based on a children’s picture book, Alexander (Ed Oxenbould) gets his birthday wish fulfilled when he transfers his bad luck to the other members of his family in “Alexander and the Terrible, Horrible, No Good, Very Bad Day.” (Walt Disney Pictures)

Going to a live-action family film usually entails plenty of eye rolling, low expectations and overpriced concessions. Parents chalk it up to yet another selfless thing they do for their children in lieu of enjoying Oscar-bound prestige films, dark, twisty thrillers or raunchy comedies.

So imagine the novelty of a family-friendly movie that manages to make parents and older siblings laugh while still firmly appealing to the elementary-school crowd.

Alexander and the Terrible, Horrible, No Good, Very Bad Day” is the latest adaptation of Washington area author Judith Viorst’s classic 1972 picture book, which was previously turned into an animated television special for HBO (1990) and a children’s musical that premiered at the Kennedy Center more than a decade ago. In this film version, director Miguel Arteta and screenwriter Rob Lieber keep the premise but expand the central theme with a dash of magical realism.

Alexander Cooper (Ed Oxenbould) believes he’s had more than his fair share of terrible days while his family seems to coast through life on a never-ending wave of good luck. The day before his 12th birthday, for example, is an epic disaster: Gum gets stuck in his hair, he nearly burns down his science class and he finds out that the most popular kid in his grade is hosting a birthday party — complete with an energy-drink bar, Korean taco truck and fog machine — at the exact same time as Alexander’s.

Meanwhile, his oldest brother, Anthony (Dylan Minnette), learns he and his girlfriend (Bella Thorne) are shoo-ins for prom court; older sister Emily (Kerris Dorsey) prepares to take the stage as the lead in the school musical; Mom (Jennifer Garner) is on the verge of a promotion; Dad (Steve Carell) has an interview lined up with a cool video-game company; and baby Trevor says his first word. Where’s the justice?, Alexander wonders. So at the stroke of midnight, he makes a special birthday wish: that his family would finally experience the kind of awful day normally reserved for him.

The next morning, the universe obliges. Everything goes wrong for the other Coopers while things start magically looking up for Alexander. To be sure, the broad physical comedy is predictable and occasionally cringe-inducing, but the cast pulls off the jokes. Carell is in his element as the optimistic father juggling baby duty with his interview with a group of young hipsters (including the excellent Donald Glover). Garner, who has long mastered the art of playing harried and overworked moms, is pleasantly frazzled as she attempts to run her household and impress her jaded publisher boss (Megan Mullally).

The talented younger actors handle the comedy like pros, whether it’s subtle bits (Anthony’s conversation with his driver’s license instructor, played by the inimitable Jennifer Coolidge) or obvious sight gags (Emily’s high-on-cough-syrup performance as Peter Pan). And as for Alexander, he is the rare kid character who doesn’t cross the line from charming to annoying.

Arteta keeps the pace fast and frenetic and doesn’t mind spotlighting potty jokes (literally — Dick Van Dyke hilariously appears as himself reading a misprinted children’s book about kids who take a “dump” instead of “jump”), but even the bathroom humor is forgivable when the end result is a crowd-pleasing comedy and a surprisingly entertaining treat for the whole family.

Chen is a freelance writer.

★ ★ ★

PG. At area theaters. Contains rude humor, including some reckless behavior and language. 81 minutes.