A Microsoft developer explained on the Windows Vista Team Blog how the firm got to the number "7" in Windows 7:
Anyway, the numbering we used is quite simple. The very first release of Windows was Windows 1.0, the second was Windows 2.0, the third Windows 3.0.
Here's where things get a little more complicated. Following Windows 3.0 was Windows NT which was code versioned as Windows 3.1. Then came Windows 95, which was code versioned as Windows 4.0. Then, Windows 98, 98 SE and Windows Millennium each shipped as 4.0.1998, 4.10.2222, and 4.90.3000, respectively. So we're counting all 9x versions as being 4.0.
Windows 2000 code was 5.0 and then we shipped Windows XP as 5.1, even though it was a major release we didn't' want to change code version numbers to maximize application compatibility.
That brings us to Windows Vista, which is 6.0. So we see Windows 7 as our next logical significant release and 7th in the family of Windows releases.
We learned a lot about using 5.1 for XP and how that helped developers with version checking for API compatibility. We also had the lesson reinforced when we applied the version number in the Windows Vista code as Windows 6.0-- that changing basic version numbers can cause application compatibility issues.
So we decided to ship the Windows 7 code as Windows 6.1 - which is what you will see in the actual version of the product in cmd.exe or computer properties.