Let me demystify this for you based on what I learned the hard way.
By level:
Undergraduate: 8,000-12,000 words (UK) / 20-40 pages (US)
Master's (taught): 15,000-25,000 words (UK) / 50-100 pages (US)
Master's (research): 30,000-50,000 words
PhD: 70,000-100,000 words (UK) / 150-300 pages (US)...