The ideal length of your statement of purpose, whether you are a graduate or undergraduate student, should not be more than an A4 sheet. That means somewhere between 500 to 1000 words approximately! Remember, it's essential that your statement of purpose be easy to read by the admissions team. Use a reasonable font size of 11 or 12pt and a font that is traditional and not too out there!
While these are the general rules to follow, some universities might have pre-set guidelines on spacing and a defined word limit! In the case of the common portal UCAS for undergraduate students, the statement of purpose can only be 4000 characters, including spacing! So keep an eye on out before you apply!