Mercury boils at 3670C. However, mercury thermometers are made such that they can measure temperature up to 5000C. This is done by
maintaining vacuum above mercury column in the stem of the thermometer
filling nitrogen gas at high pressure above the mercury column
filling nitrogen gas at low pressure above the mercury level
filling oxygen gas at high pressure above the mercury column
By filling nitrogen gas at high pressure, the boiling point of mercury is increased which extend the range upto 5000C.