MIRANDA Sawyer first realised she might be going through a midlife crisis at the age of 44. She was working on her laptop in the kitchen, marvelling at her baby daughter, when it occurred to her: “By the time you’re 18, I will be 60.”

A whole cascade of thoughts followed including the notion that she was now, statistically speaking, over halfway through her life. “I looked at F [her daughter] and suddenly I knew,” she writes in Out Of Time, her exploration of the midlife crisis, “that I had less time to go than I had already lived.”

Sawyer, now 50, is four years older than me. Until I read her book, I hadn't realised that I might be at that crisis too; might even have been there for a while. The impact takes me entirely by surprise, while reading its final chapters, since I’ve been tootling along quite nicely for the first half, laughing at the author's smart jokes, occasionally nodding at an “aha” moment. But, so affected am I that I have to put down the book and stop reading and gather myself because it’s only just half an hour till I have to formulate complete sentences and speak to Sawyer, and, actually, I’m trembling.

When I get her on the phone, I garble out some incoherent nonsense about how her book has thrown me.

Sawyer listens patiently. “Was it the death maths?” she says, with a kind of half-chuckle that speaks volumes about her perspective on the human condition. “The time you have left?” she asks. She’s talking about that particular set of calculations she believes a great many people do about their lifespan when they are somewhere in their 40s. Back in 2011, she wrote an article about the panic that had started to grip her in that kitchen moment. “Is this it?” ran the coverline on the Observer magazine.

“Yes,” I reply, realising that actually that was what I meant to say. I too have done the death maths. I too must be in the middle of a midlife crisis. I thought what I was feeling was purely grief over the death, a few years ago, of my younger brother, but now I see it’s something else as well. I even remember the calculations, done as I was preparing to make the speech at my brother’s funeral and pondering the fact that at 42 I had thought he was just halfway through his life. I had been expecting we might have another 42 years together. The idea then brought me up short. Even by law of averages we would have been lucky to have that long.

“It’s a massively freaky thing,” says Sawyer. “When I was panicking, it was all to do with that. Obviously you know everyone has these different triggers. I think that’s why sometimes people don’t believe in midlife crisis because they think it’s just because your parents are ill, or you’ve lost your job, or your kids are growing up – those kind of things that hit you in middle-age. But actually I think the fundamental thing is that something will happen and it just makes you stop for a bit and reassess your life.”

“Essentially,” she says, “there are two really strong feelings and one is, ‘Is this it?’ The other one is, ‘I’ve done it all wrong.’”

For Sawyer this crisis was “horrible”. “I don’t think I was depressed. I just felt very stuck. I was very down. But there’s an element of middle age that’s quite useful, because you have to get up and get on with your life. You’ve got other people relying on you.”

Although Sawyer’s book is enormously funny, it takes the reader to some difficult places. Few writers could probably do quite the journey she does, leaping from the banality of beauty treatments and house envy through to exquisitely moving descriptions of her parents and children. This is a book that charts the usual symptoms of the midlife crisis, the marital break-ups, cosmetic surgery, exercise addictions and daredevil acts, but also contains a chapter on the desire to escape time. There's a quick dip into whether quantum mechanics might predict some version of life after death, and even a full-throttle chapter on death anxiety and existential psychotherapy.

But Sawyer's own midlife crisis isn’t just any midlife crisis, it’s a crisis for Generation X – the demographic that followed the Baby Boomers, born from around the mid-1960s to the early 1980s. Sawyer, after all, was one of the voices of her generation, who, writing in Smash Hits, Select, The Face, and other publications, encapsulated and defined the music and pop culture of that time. That’s not to say that everyone in Generation X must feel like she does, but rather that she did a lot of the things that a proportion of people her age did. She drank, smoked, raved and got wasted. “I went out a lot and I took drugs and I fell over and I loved music – all those things that were part of that time,” she says. “I believed in my generation, its collective power, and I did a lot of things that one did.”

The book therefore is packed with tales of wild nights with musicians, interviews in which she got plastered, lists of drugs. Partly it is about what happens to someone who does all that when they hit middle age. One of the biggest changes for Sawyer, she writes, is that she now doesn’t get wasted any more.

“Was it the same for my generation as any other?” she ponders. “I think it wasn’t because a lot of what we were interested in came through to the mainstream and altered stuff. We thought, ‘We’ve won, we’ll be fine now.’ And now look at us.”

Of course, to most people, Sawyer's life looks pretty good, and she admits it is. She lives in a London flat with two children and her actor husband, Michael Smiley. Among the problems she has fretted over, is the fact that she owns a flat, not a house, and doesn’t have a garden or those doors that open out from a kitchen into an outdoor space. She knows this isn’t going to get her a lot of sympathy – but there’s a refreshing honesty to her putting it out there. “Poor me, huh?” she writes, after detailing the routine of her life with two young children. “Play the tiniest violin.”

One of the problems, for her, is the immeasurable way work has changed since she started out in the 1990s. “Since the 1990s,” she says, “there have been things that have happened to do with housing and money and where we work, and to do with capitalism, that have restricted people’s middle-aged options.” Sawyer is freelance. She has no pension. The rise of the internet has triggered a crisis in the media in which she works. She couldn’t stop working even if she wanted to, she says, because she has to pay the mortgage and has kids.

Meanwhile, the issue of status anxiety weaves its way through her book. She believes that “a lot of what we talk about, if it’s not politics, is fuelled by envy – how to get a better body, a better holiday, a nicer house”.

“Because I live in London and property is a high-status element, I became obsessed by the fact we live in a flat … I would look around at people and think, hang on a minute, you started the same as me. You own some vast mansion in Islington and you appear to be on a six-figure salary. How did that happen? What was I doing when you did that? That’s quite a weird feeling. It’s embarrassing isn’t it? It’s embarrassing to say I’m really jealous of everyone who’s got a big glass box on the back of their house.”

All this would seem self-indulgent, if it wasn’t done with Sawyer’s wit and awareness. “Of course, it’s first-world problems,” she says, “I wouldn’t be feeling like this if I was living in a refugee camp. But this is my life, and it’s quite similar to a lot of people’s lives. You’re aware that you should be immensely grateful, but it’s quite hard. And that sense of a diminishing resource, which is your life, is really strong.”

Traditionally, notes Sawyer, the midlife crisis was construed as a male condition – predominantly the territory of high-achieving men. But the version she presents exhibits in both genders. Across the world, in most societies, Sawyer observes, people experience a big dip in happiness in middle age. One startling piece of research she includes in her book is that even chimps experience this fall. Meanwhile, more and more women, she notes, are going through a crisis of the sort that those competitive men did, as they compete more in the workplace.

But it’s when Sawyer taps into more universal feelings that she is at her best: when she writes about being in the middle of life, looking up at her parents, now weaker, losing relevance, but also down at her children, growing in independence. Her mother, “the maypole we once danced around”, is now an older woman, no longer so needed, who phones up and leaves long answerphone messages “telling me that nothing much has been happening really”.

Sawyer’s children are still young, six and 11. She is due, after we speak, to pick up her daughter from football. “All I do is take children to football matches. Every weekend. Football is relentless.” She captures the rapid acceleration of time that occurs once you have children. “Time grabs you by the shoulders and marches you forwards. Life flows behind you, a plane-trail in the clouds, blossom on the breeze. Your children will leave you soon, as they must, as they should.”

In spite of all this, though, Sawyer is happier than she was in her 20s – though she misses “the exciting madness” and energy. “That’s why I go running. To try to get some of that back.”

Sawyer isn’t alone in turning to exercise as a way of tackling her crisis – she quotes research showing that exercise dependence is most frequent in men in their 40s and 50s. “Running is good,” she says, “because of the serotonin rush. I also think it’s good if you’re somebody who used to go out a lot and use up a lot of energy by going out. A lot of people have said to me it’s always ravers that run. I’m like – really? I’m such a cliché.”

Meanwhile, she does her best to resist “magical thinking” – the thoughts that tell you that you might still own a mansion or play for Manchester United. “We’re taught to dream big, that you can achieve your dreams. But actually dreams are hard to achieve. Capitalist dreams are really difficult to achieve, because capitalism is geared towards people who already have money and advantage.” As a result, people are constantly dissatisfied. “I should have a garden. I should be taller and fitter. My children should be cleverer. The problem is that those dreams that seem attainable, are not attainable, and it’s not your fault. Actually you’re all right. You’re not that bad.”

Six years on from the day she did the “death maths”, with a book behind her, Sawyer says she feels a lot better. When she celebrated her 50th birthday last month, she felt fine about the milestone. “At 44, I was really flailing. I now feel quite good. People are like, ‘Ooh, 50.’ I’m like, ‘It’s fine. Honestly. I’ve examined this from top to bottom. I am all right’.”

Miranda Sawyer will be talking about Out Of Time (published by Fourth Estate) at Glasgow book festival Aye Write! on March 12. The Herald and Sunday Herald are the event's media partners www.ayewrite.com