There is no clear origin story for the cupcake. They can be traced back as far as the late 18th century, when it appeared in a cookbook by Amelia Simmons called American Cookery, published in 1796. It was referred to as a “light cake to bake in small cups”.
The term “cupcake” was first seen in a 1828 cookbook, Seventy-Five Receipts for Pastry, Cakes, and Sweetmeats by Eliza Leslie. There are several theories to explain its origins, both of which are supported by old cookbooks:
It was originally baked in a cup
The ingredients were all measured in cupfuls — 1 cup butter, 2 cups sugar, 3 cups flour, 4 eggs (similar to the pound cake, which measures ingredients by weight rather than volume)
The second theory is also the reason why this cake was once referred to as the 1234 cake. They started out as plain cakes, quick and efficient to make, but did not start gaining widespread popularity until the early 21st century. The popular television show Sex and the City featured a bakery called Magnolia Bakery, which is credited with starting the cupcake craze in the 90s.
Similar cakes include the British fairy cake, where the top of the cake is carved out, cut in half, and the cake itself is filled with buttercream, whipped cream, or other sweet fillings, before the two halves are replaced on top of the filling like fairy wings. A more contemporary variation is the mug cake, which is cooked in a mug and can be prepared in under 5 minutes using a microwave oven. This cake gained popularity over the internet.
Nowadays, cupcakes come in all sorts of flavours, shapes, and sizes. The traditional four ingredients (butter, sugar, flour, eggs) can be substituted with many other variations, or built upon with flavourings, colours, and decorative edibles.