Neil Patrick Harris has lost 22lbs.

The 40-year-old actor admits he has shed some weight over the past few months in order to play the titular role in the Broadway musical 'Hedwig and the Angry Inch'.

Speaking on 'Live! With Kelly & Michael', he said: ''I'm skinny. When I was filming 'How I Met Your Mother', I knew this show is coming up and it's such a different type of role that for three or four months I've been doing nothing but cardio and trying to lose some weight ... I lost about 22 lbs.''

Neil - who has their three-year-old twins Gideon and Harper with his fiancé David Burtka - lost the weight by switching to a healthier diet and eating at a different time.

He explained: ''It was pretty much a combination of [diet and exercise]. I just stopped eating late. I was the kind of person who, after we put the kids down, we would go eat at like 9pm or 9.30pm. We would order food in and by the time we ate, it was 10ish. It's easier with kids because kids eat dinner around 5.30 or 6pm. And we would just eat with them and I would try to not eat later.''