For a pair $(M, I)$, where $M$ is finitely generated graded module over a standard graded ring $R$ of dimension $d$, and $I$ is a graded ideal with $ell(R/I) < infty$, we introduce a new invariant $HKd(M, I)$ called the {em Hilbert-Kunz density function}. In Theorem 1.1, we relate this to the Hilbert-Kunz multiplicity $e_{HK}(M,I)$ by an integral formula. We prove that the Hilbert-Kunz density function is additive. Moreover it satisfies a multiplicative formula for a Segre product of rings. This gives a formula for $e_{HK}$ of the Segre product of rings in terms of the HKd of the rings involved. As a corollary, $e_{HK}$ of the Segre product of any finite number of Projective curves is a rational number. As an another application we see that $e_{HK}(R, {bf m}^k) - e(R, {bf m}^k)/d!$ grows at least as a fixed positive multiple of $k^{d-1}$ as $kto infty$.