Somewhere between 250,000 GP and 125,000,000 GP. *
And it sells for full price.
Gemstones are small, lightweight, and easily secured compared to their same value in coins.
- DMG 133
The DMG does not give the weight of gems, unfortunately, but it does say that they are lightweight compared to coins, so for my calculations, I used the same weight as coins: fifty to the pound. This gives us a total of$$
500~\mathrm{pounds}~{\times}~50\frac{\mathrm{gems}}{\mathrm{pound}}~=~25,000~\mathrm{gems}.
$$
On the following page, there is a table to roll on for gems as treasure, and gives the value of each type. There's a lot of them, so they're listed at the bottom of the answer. What matters is they vary in price from 10 GP (e.g. Obsidian) to 5,000 GP (e.g. Ruby).
If your pile of gems is completely made out of Rubies, for example, you're looking at around$$
25,000~\mathrm{gems}~{\times}~5,000\frac{\mathrm{GP}}{\mathrm{gem}}~=~125,000,000~\mathrm{GP}.
$$
On the other hand, if your pile of gems is completely made out of Obsidian, you're only looking at$$
25,000~\mathrm{gems}~{\times}~10\frac{\mathrm{GP}}{\mathrm{gem}}~=~250,000~\mathrm{GP}.
$$
Don't sell it all at once, though. It's not that supply and demand is a problem, but that money is heavy, by comparison. Gem prices are static, and they are at least as efficient as Platinum by weight. It's only worth selling them when you need the money.
* Your DM might decide that you need to perform an Intelligence check to know this in character, though.
- 10 GP gems: Azurite, Banded agate, Blue quartz, Eye agate, Hematite, Lapis lazuli, Malachite, Moss agate, Obsidian, Rhodochrosite, Tiger eye and Turquoise.
- 50 GP gems: Bloodstone, Carnelian, Chalcedony, Chrysoprase, Citrine, Jasper, Moonstone, Onyx, Quartz, Sardonyx, Star Rose Quartz and Zircon.
- 100 GP gems: Amber, Amethyst, Chrysoberyl, Coral, Garnet, Jade, Jet, Pearl, Spinel and Tourmaline.
- 500 GP gems: Alexandrite, Aquamarine, Black pearl, Blue spinel, Peridot and Topaz.
- 1,000 GP gems: Black opal, Blue sapphire, Emerald, Fire opal, Opal, Star ruby, Star sapphire and Yellow sapphire.
- 5,000 GP gems: Black sapphire, Diamond, Jacinth, Ruby.
There are no specific rules regarding this, and the DMG leaves it up the to the DM. Your 1d4 for shattered glass seems reasonable (on par with a dagger); I might even bump that to 1d6 (have you seen what glass can do to someone? It's not a pretty sight). However, there are base guidelines for hazards and traps based on the character level and the amount of damage done. Those guidelines are reproduced from the 5e SRD (pg 201) below (pg 121 in the DMG). Note these values are also printed inside the 5e DM's Screen.
Damage Severity by Level
Character Level Setback Dangerous Deadly
1st–4th 1d10 2d10 4d10
5th–10th 2d10 4d10 10d10
11th–16th 4d10 10d10 18d10
17th–20th 10d10 18d10 24d10
Since these values are for traps and might be a bit harsh if you're trying to determine the damage that, say, a bramble thicket might do, it might be enough to cut the values in half (round up).
Also note that even though this table shows 1d10 is a setback for 1st-4th level characters, that damage is likely to be closer to dangerous or deadly for level 1 characters who may not even have 10 hp to lose.
Best Answer
The CR calculation for an NPC with class levels is the same as the CR calculation for a custom monster.
DMG, p92:
It is referring you to the section in Chapter 9 entitled, "Creating a Monster", p273.
Answering your questions specifically:
Is it intended for the DM to use the custom monster CR calculations to calculate CR for NPCs?
Yes.
Is the information needed to calculate CR for NPCs with class levels in the DMG or is this left as an exercise for the DM?
Well, both. The guide for determining CR based on abilities is there, but applying it to a classed character is up to the DM.