Pokémon GO Candy and Stardust requirement chart
This chart represents all the possible cost combination between leveling up your Pokémon. It covers all Levels from 1 to 40, including the 40.5 upgrade once you reach Level 40.
You read the chart from left to right. The first column is your Pokémon level and other columns are the level you are upgrading to. Impossible level combinations are empty.