Preheat the oven to 350°F (175°C) and line a muffin tray with cupcake liners. This ensures your cupcakes won’t stick and makes for easy cleanup.
In a mixing bowl, whisk together the dry ingredients: Combine 1.5 cups of all-purpose flour, 1.5 teaspoons baking powder, 0.25 teaspoons salt, and 0.5 cups ground pistachios until well blended. This step helps to evenly distribute the baking powder and salt.
In a separate bowl, beat together 0.5 cups softened butter and 0.75 cups granulated sugar using a hand mixer until the mixture is light and fluffy, approximately 3-4 minutes. This incorporates air for a soft texture.
Add in 2 large eggs one at a time, mixing well after each addition. Then add 0.5 teaspoons vanilla extract and a dash of almond extract, if using. This will enhance the flavor of your batter.
Gradually mix in the dry ingredients, alternating with 0.5 cups of milk. Start and finish with the dry ingredients, mixing just until incorporated. Be careful not to overmix, as it can lead to dense cupcakes.
Spoon the batter evenly into the prepared muffin tray, filling each liner about two-thirds full. This allows space for the cupcakes to rise without overflowing.
Bake in the preheated oven for 18-20 minutes, or until a toothpick inserted in the center comes out clean. The tops should be slightly golden brown, indicating they are fully cooked.
Once baked, remove from the oven and allow the cupcakes to cool in the tray for about 5 minutes, then transfer them to a wire rack to cool completely.
While your cupcakes are cooling, prepare the frosting. In a mixing bowl, beat 1 cup of softened butter until creamy. Gradually add 3 cups of powdered sugar and 2 tablespoons of milk, along with 1 teaspoon of vanilla extract. Beat until smooth and fluffy.
If you want colored frosting, add a few drops of green food coloring and mix until you've reached your desired shade.
Once the cupcakes are completely cool, frost them generously with your prepared vanilla buttercream. Finish each cupcake with a sprinkle of chopped roasted pistachios for an added crunch and decorative flair.