The chocolate chip cookie was invented in 1938.
The standard origin story credits Ruth Graves Wakefield, who ran the Toll House Inn with her husband in Whitman, Massachusetts. In 1938, she developed the recipe that became known as the Toll House Chocolate Crunch Cookie and published it in her cookbook, Toll House Tried and True Recipes. That publication date is why 1938 is the conventional answer to this trivia question.
Wakefield used pieces of Nestlé semisweet chocolate in a cookie dough rather than melting the chocolate into the batter. The chunks stayed distinct during baking, creating the defining chips. The recipe’s popularity led to a business arrangement with Nestlé, which later marketed chocolate chips and printed the recipe on its packaging.
The famous claim that the cookie was invented by accident is disputed. Wakefield later described deliberately creating something different from her popular butterscotch-nut cookie. Chocolate had appeared in earlier American cookies, but 1938 marks the recognized Toll House recipe and the beginning of the modern chocolate-chip-cookie tradition.