Penetration depth is calculated from the mass absorption coefficient and the "density". The density value ρ is expressed as a combination of the specific gravity of the material and the packing density.
First the path length L is calculated:
IL = I0 × exp -(μ/ρ)ρL
Next the penetration depth (τ) :
τ = 0.5 L×sin(θ)
This is the thickness of the sample contributing 99% of the diffracted intensity for a given incident angle θ.
If u use HSP, there's a MAC calculator where u can calculate the penetration depth. All u need is the wavelength, chemical formulas, weight fraction of each, estimated packing density and angle of incident (w).
i think that answers your question