The number of licenses you will need depends on the number of physical processors on the server and the number of server instances that you will be running. (This applies only for Standard edition because Datacenter edition allows for unlimited VOSEs.) The larger of these two numbers determines the number of total licenses required.
First, determine the number of physical processor licenses:
Each license covers up to two physical processors, so to determine the number of licenses needed to fully license a physical server, just count the number of physical processors in the server and divide that number by two. This tells you the number of licenses that you will need. (Note: The number of cores on the physical processor is irrelevant.)
Here are some examples:
Two-processor server: 2 physical processors / 2 (number of processors covered by a license) equals 1. You will need one license to cover a two-processor server.
Four-processor server: 4 physical processors / 2 (number of processors covered by a license) equals 2. You will need two licenses to cover a four-processor server.
Eight-processor server: 8 physical processors / 2 (number of processors covered by a license) equals 4. You will need four licenses to cover an eight-processor server.
Second, determine the number of virtual instances running:
You can either count the number of VOSEs that are running and determine the number of Standard edition licenses (one license covers up to two VOSEs), or you can purchase Datacenter, which enables unlimited VOSEs on the server.
Each Standard edition license provides you with the rights to run up to two VOSEs. To determine the number of Windows Server Standard edition licenses you need, count the total number of total VOSEs that you will run on the server; divide that number by two, and round up to the nearest whole number.
After you determine the number of licenses needed to cover physical processors and/or VOSEs, the higher of those two numbers represents the total number of licenses required. Remember that the server must have the appropriate number of licenses assigned to it to ensure coverage of all of the virtual OSEs that are running at any given time.
For example, if you are running three virtual machines (VOSEs) on a two-processor server, you will require two licenses to cover the three virtual machines.
If you assign two Standard edition licenses to a single server, you will be able to run a total of four VOSEs on that server. If you add additional Standard edition licenses to that server, the number of allowed VOSEs on that particular server will increase by two for a total of six VOSEs on that server
Can I mix Datacenter and Standard licenses on the same server?
No. All of the processors on a given server must be licensed with the same version and edition. You can run different editions or older versions of Windows Server software as guests within VOSEs, but you are not allowed to assign multiple licenses of different versions or editions to the same physical server to license the processors on the server.