the 40yearold virgin is a 2005 american sex comedy film directed by judd apatow who cowrote the screenplay with steve carell the film stars carell as the titular 40yearold virgin andy stitzer a stock supervisor at an electronics store and a toy hobbyist whose friends resolve to help him lose his virginity.