Why does this higher CP Pokemon costs less dust to upgrade than a lower CP Pokemon?

Why does my Vaporeon cost less to power up (-16%) considering that it has more CP (+16%) than my Jolteon?

enter image description here enter image description here


If you look at the arc behind the Pokemon it tells you how close the Pokemon is to is maximum CP. The closer it is to its maximum CP the higher the stardust cost.

The Vaporeon has a higher CP than Jolteon even though it is further from its maximum CP, because the Vaporeon has a higher maximum CP than Jolteon,