Every magic item has a rarity, from common to legendary, and rarity is what sets its price. Artifacts sit above the scale and are priceless. The rules treat these numbers as a guide for the DM, not a fixed catalogue: a seller can ask for a favor instead of coin, and your DM decides whether an item is for sale at all.
The 2024 rules give one value per rarity: 100 GP common, 400 GP uncommon, 4,000 GP rare, 40,000 GP very rare and 200,000 GP legendary. Three adjustments follow from the same table: a consumable such as a potion is worth half, a spell scroll is worth double its scribing cost, and a magic weapon or armor adds the cost of the mundane item it is built on. So +1 Plate Armor is 4,000 + 1,500 = 5,500 GP.
The 2014 Dungeon Master’s Guide gives a range instead: 50–100 gp common, 101–500 gp uncommon, 501–5,000 gp rare, 5,001–50,000 gp very rare and 50,001 gp or more for legendary. 2024 values for rare and better items sit near the top of the old ranges, and legendary items now have a set figure.
The 2024 rules also say where items turn up: common items can often be bought in a town or city, uncommon and rare ones usually only in cities, and rarer ones in places like a city on another plane. To turn a list price into what a particular merchant charges, use the shop price calculator; to hand out loot instead of selling it, roll on the treasure generator.