Hardware

How Many Cores Do I Have? Check Your CPU Core Count

To see how many cores you have on Windows, open Task Manager with Ctrl+Shift+Esc, go to Performance > CPU, and read the Cores line under the graph. On Linux, run lscpu and multiply Core(s) per socket by Socket(s).

The same screen shows Logical processors, and that number is usually larger. Cores are physical; logical processors are what the operating system can schedule work on. This page shows how to read both on each system, and how to spot the cases where the numbers mislead.

How many cores do I have on Windows?

Three ways, from quickest to most detailed.

  1. Task Manager. Press Ctrl+Shift+Esc, open the Performance tab, and click CPU. Under the graph you see Sockets, Cores and Logical processors. If the Performance tab is hidden, click "More details" first.
  2. PowerShell. One command prints the processor name and both counts:
Get-CimInstance Win32_Processor | Select-Object Name, NumberOfCores, NumberOfLogicalProcessors

Example output for a 6-core processor with Hyper-Threading enabled:

Name                                     NumberOfCores NumberOfLogicalProcessors
----                                     ------------- -------------------------
Intel(R) Core(TM) i5-12400                           6                        12
  1. System Information or Settings. Press Win+R, type msinfo32 and press Enter. The Processor line reads something like "6 Core(s), 12 Logical Processor(s)". Settings > System > About shows only the processor name, which you can then look up.

Microsoft defines the two PowerShell properties plainly: NumberOfCores is "the number of cores for the current instance of the processor. A core is a physical processor on the integrated circuit." For NumberOfLogicalProcessors, the documentation notes that for processors capable of hyperthreading, the value includes only the processors which have hyperthreading enabled.

Machines with more than one processor

The documentation says that on a multiprocessor computer, one instance of Win32_Processor exists for each processor. On a two-socket workstation or server the command above therefore prints two rows, and the total is the sum. To get the total logical processor count directly, ask the computer-system class, which also appears in Microsoft's example code:

Get-CimInstance Win32_ComputerSystem | Select-Object NumberOfProcessors, NumberOfLogicalProcessors

Here NumberOfProcessors is the count of sockets (physical chips), not cores. Mixing those two up is the most common reading error.

How many cores do I have on Linux?

lscpu

The manual describes lscpu as gathering CPU architecture information from sysfs, /proc/cpuinfo and any applicable architecture-specific libraries, and it reports the number of CPUs, threads, cores and sockets. Example output for a desktop with one 8-core, 16-thread processor:

CPU(s):                16
Thread(s) per core:    2
Core(s) per socket:    8
Socket(s):             1

The arithmetic is the part to check yourself: physical cores = Core(s) per socket × Socket(s) = 8 × 1 = 8. Logical processors = cores × Thread(s) per core = 16, which matches CPU(s). If Thread(s) per core is 1, there is no simultaneous multithreading, or it is switched off.

For one line per logical CPU, run lscpu -e; the manual describes -e as displaying the CPU information in human-readable format. For output meant for scripts, use -p (parse).

The quick count: nproc

nproc

This prints one number, but read the manual's wording: it prints "the number of processing units available to the current process", which may be lower than the number of online processors. Two things can lower it. If the OMP_NUM_THREADS or OMP_THREAD_LIMIT environment variables are set, they bound the result. CPU quotas, such as those a container runtime sets, also reduce it. To print the installed processors regardless, use:

nproc --all

Note that nproc counts logical processors, not physical cores. On the 8-core example above it prints 16.

What the numbers mean

A quick reference for the labels you will meet:

LabelMeaningWhere you see it
Socket / NumberOfProcessorsPhysical chips in the machine. Desktops and laptops have 1.Task Manager, lscpu, Win32_ComputerSystem
Cores / NumberOfCoresPhysical processors on a chipTask Manager, Win32_Processor, lscpu
Logical processors / threadsWhat the OS schedules work on; cores times threads per core on SMT chipsTask Manager, nproc, CPU(s) in lscpu

When logical processors equal cores, each core runs one thread. When logical processors are double the cores, SMT is on. Microsoft's own example is a dual-processor system with two hyperthreaded processors: NumberOfCores is 2 and NumberOfLogicalProcessors is 4, so it can run four threads simultaneously.

Why the count can look wrong

  • Mixed core types. Some chips combine performance and efficiency cores, and only the performance cores run two threads. Core and logical counts then do not follow a neat 1:2 ratio, and the total can be odd-looking. This is normal. The article on cores vs threads works through a real 14-core, 20-thread example.
  • Virtual machines. A guest reports whatever its hypervisor presents. If you are inside a VM, the tools above describe the VM, not the host.
  • Containers and quotas. nproc can report fewer processing units than the machine has, as described above. Use nproc --all or lscpu to see the installed hardware.
  • Cores disabled in firmware. Microsoft's documentation lists a separate NumberOfEnabledCore property, the number of enabled cores per processor socket, available from Windows 10 and Windows Server 2016. If a firmware setting turned cores off, compare it with NumberOfCores.
  • Hyper-Threading turned off. Then logical processors equal cores even on a chip that supports SMT. The setting lives in the firmware (BIOS/UEFI) setup, and the OS cannot override it.

To compare enabled cores with total cores in one command (Windows 10 or later):

Get-CimInstance Win32_Processor | Select-Object Name, NumberOfCores, NumberOfEnabledCore, NumberOfLogicalProcessors

How many cores do you actually need?

That depends on the work, and the core count alone does not settle it. Everyday tasks such as browsing, documents and video calls run comfortably on a handful of cores. Work that splits into many independent pieces, such as video encoding, 3D rendering or compiling a large project, keeps extra cores busy. A single-threaded program uses one logical processor at a time, which is why it can show a low overall CPU percentage on a machine with many logical processors while still running flat out. When comparing two processors, compare cores first, then core types, clock speed and generation, rather than the thread count alone. For the details of that comparison, see CPU cores vs threads.

Check the rest of your specs

If you want RAM, graphics card, disk and Windows version alongside the core count, how to check your PC specs on Windows covers the built-in tools. Use the processor name from any of the commands above to find the exact core and thread counts on the manufacturer's specification page, which is the authoritative figure for the chip itself.

If the number still looks wrong

Run the PowerShell or lscpu command again and compare three values: sockets, cores and logical processors. If NumberOfProcessors is greater than 1, add the rows together. If you are in a VM or a container, look at the host instead. If the processor name does not match the chip you bought, the machine may have a different configuration than the listing said, and the specification page for the name shown is the thing to compare against.

Frequently asked questions

Is the number of cores the same as the number of threads?
Not always. A core is a physical processor on the chip. A thread, or logical processor, is what the operating system can schedule. With Hyper-Threading or SMT one core shows up as two logical processors, so a CPU with 6 cores can report 12 logical processors.
Why does my computer show more logical processors than cores?
Simultaneous multithreading is turned on. Microsoft's Win32_Processor documentation says that if hyperthreading is enabled in the BIOS, NumberOfCores is less than NumberOfLogicalProcessors. Microsoft's own example is a dual-processor system with hyperthreading enabled, where NumberOfCores is 2 and NumberOfLogicalProcessors is 4.
Does a virtual machine show the real core count of the host?
No. Inside a virtual machine the tools report what the hypervisor gives the guest. A VM set up with 4 virtual processors shows 4, whatever the physical host has. The nproc manual also notes that its result can be lowered by CPU quotas and OpenMP environment variables.
How do I find the number of cores without opening anything?
Look up the processor name (for example in Settings under System, then About) in the manufacturer's specification page, which lists total cores and threads. That also tells you the core types on chips that mix performance and efficiency cores.

Sources