When swapping one spice for another, first check which flavour family it belongs to: earthy (cumin, coriander seed), sweet-warm (cinnamon, clove) or sharp (black pepper, chilli flakes). A spice from the same family makes a far safer swap than one from a different one.
The second thing to match is intensity: some spices are much sharper than others, so swap by taste rather than a one-to-one measure.
Whether a spice is whole or ground also affects substitution; whole spices keep their flavour far longer than ground ones, so a freshly ground spice can be used in a smaller amount than an old ground one.
Some spice blends (like chai spice mixes) should be thought of as replacing several spices at once rather than one; on their own, they're not a full substitute for any single spice.
How a spice is stored can also speed up flavour loss; a spice jar exposed to light and moisture loses its flavour far faster than one kept in a dark, dry cupboard. That's worth factoring in whenever you're substituting one spice for another.
What can replace ginger?
Without fresh ginger, a small amount of ground ginger can be used instead; the ground form is sharper than fresh, so cut the amount down to about a quarter.
Without any ginger at all, a small amount of cinnamon and black pepper together can work; the mix partly approaches ginger's warm note but doesn't fully match its sharpness.
What can replace cumin?
Without cumin, coriander seed or a small amount of mixed spice can work; coriander is lighter and more citrusy than cumin, so you can use a bit more of it. In red meat dishes, allspice comes closest to cumin's role.
Cumin's deep earthiness can't be fully matched by another spice; expect the dish's flavour to shift slightly when you substitute.
What spice can replace cinnamon?
Without cinnamon, a small amount of clove or allspice can work in desserts, since both belong to the same sweet-warm family. Clove is much sharper than cinnamon, so use about half the amount.
Turmeric looks similar to cinnamon in colour but tastes completely different, so it can only stand in where cinnamon is used purely for colour.
What can replace black pepper?
Without black pepper, white pepper works well; the flavour is close, the only difference being that white pepper is sharper and slightly less aromatic. In pale sauces, white pepper also looks better since it leaves no dark specks.
Chilli flakes can work too, but since they belong to a different family they add both heat and a different colour, so use them only where a bit of heat is welcome.
Can a ready-made spice blend replace a single spice?
Ready-made blends (like meatball spice or chicken seasoning) add several flavours at once when used in place of one spice, so the result won't match the original recipe exactly. They work in a pinch, but use about half the amount the recipe calls for.
Watch the salt level when using a blend — many ready-made mixes already contain salt, so cut back any salt the recipe adds separately.