Preheat the oven to 350 degrees F (175 degrees C). Lightly grease a 2-quart casserole dish.
Bring a large pot of salted water to a boil. Add carrots and cook until tender, 15 to 20 minutes. Drain and mash. Stir in butter, vanilla extract, and eggs; mix well.
Sift flour, baking powder, salt, and sugar together. Stir into carrot mixture and blend until smooth. Transfer to the prepared casserole dish.
Bake in the preheated oven for 45 minutes.
