How to convert MBR TO GPT WITHOUT DATE LOSSING DURING FORMATING

Dear Sir, Good morning i just completed hardware and network , my quarry is -how do i convert MBR TO GPT disk during formatting a pc to install new os like windows 10.and how do activated window 10 without buying .