You can calculate the exact maximum CP for each Pokémon, as long as you have all the correct data for that specific Pokémon.
The first thing you're going to have to figure out, are what the individual values (IV) are for each Pokémon you want to compare. Every Pokémon has 3 hidden IVs, one each for Attack, Defense, and Stamina. These values range from 0 to 15, and are used to calculate the Pokémon's CP.
You can use online tools such as the IV Calculator from Poké Assistant to find these values.
The next thing you'll have to look up, are the base stats for whichever species of Pokémon you're comparing. Each species has a set of base stats, which are also used to calculate CP.
You can find base stats all over the web, The Silph Road has a whole list of Species Stats
To calculate the maximum possible CP, you'll simply use level 40 in your calculations. If you want to know what the maximum CP is for your current trainer level, you'll use your trainer level plus 1.5. For example, if you're level 20, you can only power a Pokémon up to level 21.5.
To calculate CP, you don't use the level directly, instead you have to look up the CP Multiplier for that level. Luckily, the CP Multiplier can also be found on the web, at sites like GamePress.
The formula looks like this...
Max CP = Floor(((BaseAttack + IndividualAttack) * (BaseDefense + IndividualDefense)^0.5 * (BaseStamina + IndividualStamina)^0.5 * CPMultiplier^2) / 10)
As an example, I'll calculate the maximum CP of a 12/14/15 Pidgey if your trainer level was 20.
Max CP = Floor(((85 + 12) * (76 + 14)^0.5 * (80 + 15)^0.5 * (0.619399365)^2) / 10)
Max CP = Floor((97 * 9.4868329805051379959966806332982 * 9.7467943448089639068384131998996 * 0.383655573362403225) / 10)
Max CP = Floor((3441.0921526345817698060490793408) / 10)
Max CP = Floor(344.10921526345817698060490793408)
Max CP = 344
You can also easily calulate the absolute maximum CP, by simply using the CP Multiplier for level 40.
Max CP = Floor(((85 + 12) * (76 + 14)^0.5 * (80 + 15)^0.5 * (0.79030001)^2) / 10)
Max CP = Floor((97 * 9.4868329805051379959966806332982 * 9.7467943448089639068384131998996 * 0.6245741058060001) / 10)
Max CP = Floor((5601.9440442159961329825324916023) / 10)
Max CP = Floor(560.19440442159961329825324916023)
Max CP = 560