Five-spice powder is traditionally composed of cinnamon, fennel seed, cloves, star anise, and Szechuan peppercorns, though some versions also contain ginger and/or nutmeg. It encompasses each of five flavour groups: sweet, sour, salty, bitter, and spicy-hot. Because five spice has a strong flavour, it should be used sparingly, especially if the spice blend is freshly ground.
The simplest substitute for five spice powder is an equal-parts blend of its five base spices. To make this, grind together 1 tsp each of fennel, cinnamon, anise, Szechuan peppercorn, and cloves until they are powdered. You can use this right away, or set it aside in a dry, cool place to allow the flavours to blend a little bit.
Easy-To-Find Substitutes for Individual Spices
A couple of five-spice-powder ingredients are hard to find. Substitute a teaspoon of fresh-ground black pepper for the Szechuan peppercorn if necessary, or nutmeg or allspice for the cloves. Caraway or cumin can be substituted for the fennel while still preserving the Asian flavours. Ground anise seed is a good substitute for anise, but the flavour is a little weaker; liquorice extract is also a good exchange, or even ginger, provided you are still using fennel.
One or two of the spices may be swapped while still retaining the five-spice flavours, but more than that may ruin your dish. Be especially careful about swapping something else for both fennel and star anise. These two spices contribute the liquorice flavour characteristic to five spice. You can get by with only one, but eliminating both makes your five spice unbalanced in flavour.
Fresh Five Spice
For the most flavour, you can make fresh five spice. Start with 2 tsps. of Szechuan peppercorns. Heat them in the microwave in one-minute increments until the aroma is released. Grind the peppercorns and eight star anises together, then blend with 1/2 tsp ground cloves, 1 tbsp of ground cinnamon, and 1 tbsp of ground fennel seeds. Blend well, then grind together until very fine.