In Windows Task Manager under the Perofrmance tab, I see this under Physical Memory:
Total 3582 Cached 867 Available 846 Free 11
How come the numbers don't add up to the total? What is the difference between free memory and available memory?
From Microsoft's Description of What the Available Bytes in Task Manager Represents :
See the above article for an explanation of what these lists mean.
The smart-a* answer is "because they're not supposed to add up to the total". :)
Seriously: First, you're missing the "in use" memory. Another term for "in use" would be "in a process working set, or one of the system working sets, or in a nonpageable allocation." Briefly this is all the RAM that is "underneath" virtual addresses that can be referenced without incurring a page fault. You can calculate "In use" as "Total" - "Available" - "Modified"... except that you don't have a counter there for the Modified page list. The MPL is usually quite small, unless you are running without a pagefile.
As harrymc said, "Available" is the sum of three lists, called the Standby, Free, and Zero page lists. Free and Zero pages contain no information that is associated with any running process. Standby, however, contains pages lost from processes that might be needed by those processes again soon (they would be brought into those processes via one type of "soft page fault") - but if some Standby pages need to be put to some other use, that can happen instantly, because any data that's in Standby pages is also available on disk and can be read back in from disk if necessary.
So right away, you can see that if you're trying to add "Available" and "Free" together, that's a mistake... because "Free" is already part of "Available", so you're counting "Free" twice.
(To make life more fun, what Task Manager reports as "Free" actually includes both the Free and Zero page lists.)
The big contributor to the discrepancy, though, is usually the "Cached" counter. In Windows 7 "Cached" includes both the file system cache working set (not SuperFetch, this is something different) and the standby page list. So if you try to add "Available" and "Cached" together, you're counting the Standby list twice, which of course will lead you astray.
In Windows 8 and 10 they have further confused things by counting the MPL as part of "Cached" on the Task Manager display.