Torchlight/Enchantments

N is the number of the times that an item was enchanted

Items General Info has a list of base prices based on level.
 * Vendor price: $$Base Price \times (1 + 0.25 \times N)$$
 * Shrine price: 0


 * Vendor failure rate: $$N \times 2%$$
 * Shrine failure rate: $$N%$$

Barter does not influence enchanting prices contrary to what the skill help says.