We compute analytically, for large , the probability distribution of the number of positive eigenvalues (the index ) of a random matrix belonging to Gaussian orthogonal (), unitary () or symplectic () ensembles. The distribution of the fraction of positive eigenvalues scales, for large , as where the rate function , symmetric around and universal (independent of ), is calculated exactly. The distribution has non-Gaussian tails, but even near its peak at it is not strictly Gaussian due to an unusual logarithmic singularity in the rate function.