Ore is natural rock or sediment that contains one or more valuable minerals, typically containing metals, that can be mined, treated and sold at a profit. Ore is extracted from the earth through mining and treated or refined, often via smelting, to extract the valuable metals or minerals. The grade of ore refers to the concentration of the desired material it contains. The value of the metals or minerals a rock contains must be weighed against the cost of extraction to determine whether it is of sufficiently high grade to be worth mining, and is therefore considered an ore.