The grade of a tumor is determined by a pathologist who examines a sample of the tumor tissue under a microscope. The pathologist assesses certain features such as the size and shape of the cells, the rate of cell division, and the presence of necrosis (dead cells). Based on these observations, the tumor is assigned a grade, typically ranging from 1 to 4, with higher numbers indicating more aggressive tumors.