The starring role in “Grandma” was tailor-made for veteran actress and comedienne Lily Tomlin — and it’s ideal.

Writer-director Paul Weitz wrote “Grandma” with Tomlin’s voice in mind. His inspiration for the movie came to him during the filming of the 2013 comedy “Admission,” starring Tina Fey and Paul Rudd.

Tomlin had a supporting role in “Admission.” But as Elle, the unfiltered character Tomlin plays in “Grandma,” she’s the main attraction. At 76, Tomlin applies her expert comic timing to one of the best-written parts she’s played in her 50-year career.

Tomlin leads the small but exceptional cast in a story set in a single day. Her character’s frank, sometimes hostile, rejection of pretense and nonsense makes Elle a funny, rascally old lady.

“How come you stopped writing?” a fan asks the once-famous poet.

“People stopped reading,” Elle answers.

But you wouldn’t want to be on the receiving end of Elle’s temper. For instance, Cam, the sort-of boyfriend of Elle’s teen-age granddaughter, catches the worst of it for being, as Elle says, “a sorry-ass loser.”

Sage (Julia Garner) is pregnant. The teen knocks on her grandmother’s door in the morning. She needs $600 to pay for an abortion.

“Does your mother know?” Elle asks.

Sage’s mother, Judy — Marcia Gay Harden in another of the film’s well-written and well-played female roles — doesn’t know. In the absence of the girl’s mother, who is Elle’s estranged daughter, Grandma agrees to help Sage find money to pay for her abortion. The clock is ticking. Sage has a 5:45 p.m. clinic appointment.

Grandmother and granddaughter spend the rest of the day trying to raise $600. In the meantime, more details about Elle’s life are revealed. There were men in Elle’s life, as evidenced by the adult daughter she calls a brat. There was a woman, as well. Sam Elliott makes the most of his role as one of the men. The reunion of Karl and Elle is among the movie’s best moments.

While the principal cast members of “Grandma,” including Garner’s Sage, all do admirable work, Tomlin’s natural turn as Elle belongs on short lists for 2015 acting awards.