You can upgrade from windows 8.1 pro to windows 10 and your windows will be activated, If you already have activated windows 8.1 professional, Otherwise your windows 10 will be trail version.
In this matter all you need is a Product key, Which through you'll activated your OS, Then you can reinstall your OS and activate it as you want.
Recently, I upgraded my windows 8.1 pro to windows 10, but my laptop become slow, So I format and install new windows 10 OS, Now I'm searching its product key for activation. Hope it will helpful for you.