The main focus of this paper is on the problem of relating an ideal I in the polynomial ring Q[x(1),...,x(n)] horizontal ellipsis ,xn] to a corresponding ideal in Fp[x(1),...,x(n)] where p is a prime number; in other words, the reduction modulop of I. We first define a new notion of sigma-good prime for I which does depends on the term ordering sigma, but not on the given generators of I. We relate our notion of sigma-good primes to some other similar notions already in the literature. Then we introduce and describe a new invariant called the universal denominator which frees our definition of reduction modulo p from the term ordering, thus letting us show that all but finitely many primes are good for I. One characteristic of our approach is that it enables us to easily detect some bad primes, a distinct advantage when using modular methods.