I think the answer to this depends on the nature of the threats (and attackers) that you consider within scope to act against your PC.
IN GENERAL -- If you do a "real" re-format of the computer's hard drive (including, as some other posters have mentioned, the boot sectors), and then install a new operating system (something other than Microsoft Windows, hopefully... but even Windows will do, as long as you are installing it from a DVD as opposed to just "restoring" from the manufacturer's "restore partition", which of course could easily have been compromised by the same malware as is the reason for re-creating the O/S in the first place), then for MOST use cases under MOST conditions, doing this should provide an acceptable level of confidence that the computer will not be "pre-compromised" by the time that you first use it.
Now having said that, please be aware, as earlier posters have correctly pointed out, there very definitely are a series of advanced malware and physical / BIOS tampering attacks, that can so badly compromise the computer's basic infrastructure, so that really the only 100% safe course of action is just to junk it and go on to another PC.
In my experience, these types of attacks are very rare, but if (for example) you are in a high-threat environment (e.g. you are a Chinese or Iranian dissident, you are Edward Snowden, etc.) you are best off not taking a chance... particularly if it is likely that an attacker may, at some point, have had physical access to the PC in question. (The NSA is expert in planting BIOS and hardware compromises that are virtually impossible for anyone except another nation-state-level intelligence agency, to detect or remove.)
Incidentally, I would like to note another threat that too many people forget about, when initializing a "new" PC : namely, "using the same local access password, particularly the administrator account password, as I used on the last PC". The logic behind this is straight-forward : "I put a backdoor on your 'old' PC and intercepted your password; so when I see your 'new' PC show up on the Internet... guess which password is the first one that I'm going to try, when I attempt to break in to the 'new' PC?"
Here's a dirty trick, by the way : set up a "dummy" account, with zero privileges and have it carefully monitored, using the "old" password... and wait to see what happens. In effect you are setting up a local "honeypot" to lure the miscreants who compromised your "old" PC. There is always a chance of a privilege elevation exploit, of course, so you should be really careful to lock the "dummy" account down so even if someone successfully authenticates to it, they can't go anywhere or do anything.
The point is, change all your passwords, immediately, if you think you have been compromised. And don't trust anything that may have been physically compromised. Do that and you should be safe from (almost) all likely threats.