It is copied from here: http://serverfault.com/questions/85470/meaning-of-the-buffers-cache-line-in-the-output-of-free
A good explanation of how to understand the free command output in Linux system.
Why does my server show
total used free shared buffers cached Mem: 12286456 11715372 571084 0 81912 6545228 -/+ buffers/cache: 5088232 7198224 Swap: 24571408 54528 24516880
I have no idea on calculating the memory in linux. I think it says that 5088232 is used where as 7198224 is free, meaning it is actually consuming 5GB of RAM?
==========================================
The display columns mean:
total=use+free
The first line is about your physical memory (RAM), the last line "swap" gives the same information about swap space usage (i.e. memory contents that have been temporarily moved to disk). The second line gives the numbers for used/free minus the sum cached+buffers (because that value is often more meaningful).
To actually understand what the numbers mean, you need a bit of background about the virtual memory (VM) subsystem in Linux. Just a short version: Linux (like most modern OS) will always try to use free RAM for caching stuff, so "free" will almost always be very low. Therefore the line "/+ buffers/cache:" is shown, because it shows how much memory is free when ignoring caches; caches will be freed automatically if memory gets scarce, so they do not really matter.
A Linux system is really low on memory if the free value in "/+ buffers/cache:" gets low.
For more details about the meaning of the numbers, see e.g. the questions: