What is the grading of malignant tumors based on?

Degree of activity. Tumors are graded depending on how much replication they have the potential of, so if a tumor is very active with a lot of evidence of dividing cells - that is grade 3, so worse the prognosis as spreads faster and gets more resistant to chemo drugs.