Both.
There are several parties that rate pieces, most notably the institutions that offer grade exams, like the ABRSM, the Trinity College, Guildhall, etc.
After a few years teaching you pretty much know which grade will be given a certain piece, give or take a grade.
Unfortunately there is no place (that I know off) where that whole piano repertory is graded. You can get all of the pieces' grades by the ABRSM on the UK piano teacher’s Group (you need to become a member to access the files, but it is free):
https://www.ukpianogroup.f9.co.ukHowever, I myself pay no attention to grades for several reasons:
1. The difficulty of a piece is highly personal. What may be very easy for one person may present insurmountable difficulties for another. A piece rated as grade 1 can feel like grade 8, and I have total beginners tackling successfully grade 6/ 7 pieces.
2. Intitutions like the ABRSM disagree with other institutions in terms of gradings, sometimes even with themselves. Satie’s Gymnopedie no. 1 was considered grade 3 in the 70s and resurfaced four years ago as grade 6. This year Brahms Waltz op. 39 no. 9 and Schumann’s Fantasietanz Op. 124 no. 5 were both considered grade 5. I cannot really see how that can be (Brhams is far easier – probably grade 4, while Shcumann is grade 6/ 7)
3. There are only two kinds of pieces: easy and impossible. And the difference between them is correct practice.
4. Far more important than the grade of difficulty of a piece is the grade of love you feel for it. It is far more rewarding and meaningful to learn/teach a grade 8 piece you love, than a grade 1 piece you detest.
So do not worry too much about grades and ask yourself instead the question: Which are the pieces that I love so much that I will be prepared to go to hell and back to learn it?
After you answer this question, go and sell your soul to play it!
Best wishes,
Bernhard.