Depletion

The material mentioned 2 methods for depletion, cost & percentage of depletion. I need to know which one is required by the IRS, or anyone of them? Thanks in advance.