At one time, Danica McKellar was best known for her role as Winnie Cooper on the TV show The Wonder Years; more recently, she played a speechwriter on NBC’s The West Wing. But now the actress, a longtime mathematics advocate (not to mention the co-author of a physics theorem), is making herself known to a new generation, with two books about math for teenage girls. And both are bestsellers.

McKellar has more than an actor’s timing: a recent study published in Science magazine showed no gender gap in the standardized test math scores of seven million American students. “I don’t think there are any parents anymore who think girls shouldn’t do math,” said Luke Dempsey, editor-in-chief at Hudson Street Press, the adult imprint at Penguin that published McKellar’s books in hardcover. “The great thing about Danica is she says you can be smart but you can also be fun. Just make math a part of your life—it doesn’t have to be this awful thing that sits on your back.”

Math Doesn’t Suck: How to Survive Middle School Math Without Losing Your Mind or Breaking a Nail debuted in summer 2007 and became a national bestseller; a paperback edition arrived from Plume earlier this year. A sequel for teens, Kiss My Math: Showing Pre-Algebra Who’s Boss, pubbed last month, and both books hit the New York Times children’s lists (despite being published by adult imprints), where they have remained for the last month.

McKellar’s writing style is conversational and lighthearted: for example, she compares the concept of variables to going on a blind date. “You have no idea what to expect.... will he be charming? Smart? Cute? What will his value be?” But with step-by-step instructions and practice problems, the books are clearly educational tools, even as they take cues from teen magazines: sidebars include “math horoscopes,” personality quizzes and study tips. “They’re not like the books you or I had in middle or high school,” Dempsey said. “It’s like having your best girlfriend telling you how to do math.”

McKellar is just wrapping up a national tour for Kiss My Math. Dempsey says that while McKellar’s celebrity helped draw attention to Math Doesn’t Suck last year, this time the media focus is on young women and education. “There’s none of that 'What’s Winnie been doing?’ ” he said. “It’s, 'Here’s Danica and she’s going to talk about math.’ ”