As Digger mentioned, you want to know the weight of the pure gold that is in the piece. The formula is a piece of cake. It's the Karat divided by 24.
So, a 14 Karat piece is 14/24 or 58.33% pure gold by weight.
The price of gold is usually given as so many dollars per ounce. The hooker here is that there are two kinds of ounces. The one we use in every day life (avordupois ounce) and the one used to weigh precious metals (Troy ounce). Troy ounces is what is used in the gold price quotes.
Your best bet is to measure in grams and then convert or get a gram based quote.
As an individual, you will never be able to buy at the gold quoted price, or sell at that price. That's because you have to go through at least one middleman, plus when selling you will incurr assay fees. So, once you know how to calculate the price of gold a piece contains, you can compare it to what they are offering and see how much commision or profit they are trying to make on the deal.
When selling for melt value, a refinery will usually give you a better price than a jewler.