Calculation of memory usage

How is the total memory utilization calculated for a Windows server monitor?

Memory utilization for Windows is calculated using WMI queries. 

The Total, Free, and Used Memory is calculated using Select FreePhysicalMemory,TotalVisibleMemorySize from Win32_OperatingSystem WMI query.

The Swap Memory value is calculated using Select Name,AllocatedBaseSize,CurrentUsage from Win32_PageFileUsage WMI query.
Open PowerShell and execute the below command to view data,
Get-WmiObject -Query "Select Name,AllocatedBaseSize,CurrentUsage from Win32_PageFileUsage" -ComputerName '.'
From the output, SWAP memory utilization % can be calculated by Current usage/AllocatedBaseSize x 100.

Know the other memory related metrics that we provide for Windows monitoring. Learn more.