<Tr> <Th> Budget </Th> <Td> $26 million </Td> </Tr> <Tr> <Th> Box office </Th> <Td> $177.4 million </Td> </Tr> <P> The 40 - Year - Old Virgin is a 2005 American sex comedy film directed by Judd Apatow, who co-wrote the screenplay with Steve Carell . The film stars Carell as the titular 40 - year - old virgin Andy Stitzer, an electronics salesman and a toy hobbyist whose friends resolve to help him lose his virginity . It was the directorial debut of Apatow, who has since directed successful films such as Knocked Up, Funny People, This Is 40 and Trainwreck . The screenplay features a great deal of improvised dialogue . The film was released theatrically in North America on August 19, 2005 . </P> <P> Andy Stitzer is a 40 - year - old virgin who lives alone, his apartment filled with his collection of action figures and video games . At a poker game with his co-workers David, Cal, Mooj and Jay, when conversation turns to past sexual exploits, they learn that Andy is still a virgin, and resolve to help him lose his virginity . </P>

When did the 40 year old virgin come out