Depends on the pet and it's metabolic rate and the full feed of that pet (as cost will be ratio of those two).
Depends if it has focus passive and if you intend to activate that once unlocked (as it will eat more bars).
Depends on the XP growth per level of that individual pet, some pets are 1000's xp more per level.
Depends if you will trick your pet at 100% focus.
Depends how good your pet training skills are if you intend to trick it lower than 100% focus.
Depends on the full feed of the pet
Depends if you want to allow passive xp growth with it spawned.
Tricking with low level tricks like dance will cost you more than higher tricks.
Basically the trainer will influence overall cost.
If you're training it to re-sell only, consider the market first.
If you training it "just" for the passive consider a ring in some cases.
If you're training it for future pet battles, don't hold your breath.
If you're training it because it costs less than other EU activities, and you just want to tick over some hours online, then enjoy.
So what pet is it?
Rick
edit: Also depends of the food mafia, and how much your willing to pay for bars and how many trainers are keen to burn up the bars within the market. bought 6K bars for 211% over the weekend, prices were over 300% at one point.