Loosely inspired by the real-life cancer battle of screenwriter Will Reiser, "50/50" is 50 percent affecting medical drama and 50 percent first-rate character study. It's also a comedy that sometimes makes you feel uneasy about laughing.

Joseph Gordon-Levitt plays Adam, a 27-year-old Seattle radio reporter stunned to learn that his back pain doesn't stem from jogging but malignant spinal cancer. His odds of survival are even money, and the film details the turmoil that this half-death-sentence unleashes in Adam's relationships. Adam, a mild, stable, tidy sort, has just slammed into the Mount Everest of messes.

Best friend Kyle (Seth Rogen) reacts to Adam's news with candid alarm, then declares that they'll beat the big C together, as if you can tag-team osteosarcoma. Since Kyle is a blowhard with the emotional grace of a bull in a china shop, he's not the ideal companion for what may be Adam's final days. His idea of being supportive is urging Adam to shave his head and look more cancer-y so they can score some sympathy sex at the pickup bar. "He still has his sense of humor!" Kyle barks. "It's inspirational!" But Adam has to fight this battle with the recruits he's got, and he's got Kyle.

He also has an overprotective mother (Anjelica Huston), who finds ways to make her son's calamity all about herself, announcing that she's moving in with Adam, a smothering move that is as concerned as it is insensitive. Add to the mix Adam's self-absorbed girlfriend (Bryce Dallas Howard, perjury in every wide-eyed smile) and his novice therapist (Anna Kendrick, painfully sincere and overwhelmed), and you have a formula for emotional havoc.

Director Jonathan Levine has the ideal approach to the material, which is to stand aside, frame each scene honestly and let the actors drive the story. Gordon-Levitt is impressive as a regular Joe sideswiped by all the world's cruelty and injustice. He gives us the sense of a man groping for something to keep him afloat while trying not to panic. He's abject, stoic, antic, wistful but always proud even as his capacities diminish, never stooping to make poor-me claims on our sympathy. Rogen's performance is not of the sort to entirely please his admirers, and hooray for that. His man-child excesses are exasperating until they're revealed as the only morale-boosting strategy that this boisterous lummox can imagine.

The script follows the zigzag of messy life, not the three-act pattern of screenplay manuals. Drawing from his own experience, Reiser avoids artificial humor, synthetic situations and tidy epiphanies. He stubbornly, consistently plays every moment for matter-of-fact realism. Nothing feels preordained, least of all the ever-shifting mood.

The reason "50/50" works is it's not trying to force us into any particular emotion. It fits in the emerging category of sad-man comedies such as "Up in the Air" and "Crazy, Stupid Love," telling its downbeat tale with tenderness, sincerity and warmth. "50/50" isn't a cancer buddy comedy or a male weepie but a message movie. The message is that you can tackle pretty much any subject matter and tell a story any way you want to onscreen as long as it's absorbing.