*Usually*, base price equals market price.
If expensive base materials (weapons and armor), XP costs (Limited Wish, Wish...) and/or expensive material components (Stoneskin, Raise Dead...) are involved, the above is not true.
Base price...
...for scrolls/wands:
base price (gp) = spell level x caster level x 25/750
...for weapons
base price (gp) = (weapon bonus x weapon bonus x 2,000) + weapon special abilities costs (gp)
...for armor
base price (gp) = (armor bonus x armor bonus x 1,000) + armor special abilities costs (gp)
Calculate the market price using the follwing formula:
market price (gp) = base price (gp) + material costs (gp) + material components* (gp) + (XP components x 5)
*Focus components are not added
Buying price = market price (shop -> PC)
Selling price = market price / 2 (PC -> shop)
Calculate costs to create (Itemcreation Feats) using the following formula:
money costs (gp) = (base price (gp) / 2) + material costs (gp) + material components (gp)
XP costs = (base price (gp) / 25) + XP components
time to create (days) = base price (gp) / 1,000 (round up)
Four examples to illustrate the above formulas:
+2 mithral breastplate
base price = 4,000 gp (4 x 4 x 1,000)
market price = 8,200 gp (4,000 gp + 200 gp [breastplate] + 4,000 gp [mithral medium armor, DMG, pg. 243])
money costs to create = 6,200 gp (4,000/2 gp + 200 gp [breastplate] + 4,000 gp [mithral medium armor, DMG, pg. 243])
XP costs to create = 160 XP (4,000/25 XP)
time to create = 4 days (4,000/1,000)
+2 keen longsword
weapon bonus = 3 (2 [+2] + 1 [keen])
base price = 18,000 gp (3 x 3 x 2,000)
market price = 18,315 gp (18,000 gp + 15 gp [longsword] + 300 gp [masterwork weapon])
money costs to create = 9,315 gp (18,000/2 gp + 15 gp [longsword] + 300 gp [masterwork weapon])
XP costs to create = 720 XP (18,000/25 XP)
time to create = 18 days (18,000/1,000)
Scroll of Stoneskin, caster level 7
base price = 700 gp (4 x 7 x 25)
market price = 950 gp (700 gp + 250 gp [material component])
money costs to create = 600 gp (700/2 gp + 250 gp [material component])
XP costs to create = 28 (700/25 XP)
time to create = 1 day (700/1,000)
Scroll of Wish, caster level 17
base price = 3,825 gp (9 x 17 x 25)
market price = 28,825 gp (3,825 gp + 25,000 gp [5,000 XP x 5 gp])
money costs to create = 1,912.5 gp (3,825/2 gp)
XP costs to create = 5,153 XP (3,825/25 XP + 5,000 XP [XP component])
time to create = 4 days (3,825/1,000)