I keep forgetting this one, so here it is.

vmstat -s -SM | grep "free memory" | awk -F" " '{print$1}'

It pipes vmstat output through grep and awk to pull just the number – no units, no labels, just the gigabytes sitting there doing nothing.