Personally, I've never had much difficulty telling the difference between a muffin and a cupcake. But it seems others do. Here's a Q and A on this very subject from WESH.com:
Q: I purchased chocolate, chocolate chip muffins from local grocery store. My husband said they weren't muffins they were cupcakes. I asked the bakery department. They didn't know difference, but said what I purchased was muffins. What is the difference between muffins and cupcakes? --Maureen
A: The quick-and-dirty answer on this is that cupcakes have frosting, whereas muffins do not. However, in researching, I found an excellent formulaic definition of the difference courtesy of Diana's Desserts: "A basic formula for muffins is 2 cups flour, 2-4 tablespoons sugar, 2½ teaspoons baking powder, ½ teaspoon salt, 1 egg, ¼ cup oil, shortening or butter and 1 cup milk. When the fat, sugar and egg ratio in a recipe reaches double or more than this, you have reached the cake level."