No, it's more complicated than that. It depends on whether you use avg cost, FIFO, or selected shares. Also, the rules changed for the holding companies where starting with 1/1/12 (or was it 1/1/13?) they must track basis for you, and you select which of the three methods you want to use for selling shares purchased after that date.
For older shares, they don't have to track basis, but Vanguard will provide you with the average cost method. You can use a different method but you'd have to figure it out for yourself, and you wouldn't be able to use VG's average cost reporting after that.
I've started typing in more details a couple of times but with that change of basis reporting methods and how sales are split between shares falling under the old and new rules, and the three different options, it's just too complicated to try to explain and I'd probably get it wrong. Do some work on your own via google and/or information you can probably get from Vanguard's site. Check Fairmark.com, they often have well-written explanations for things like this. If you still have specific questions after that come back and ask. Or maybe someone else wants to tackle the topic, but not me.
You can also probably model sales by going through the sale process and then canceling it and see how much VG tells you about the cost basis. Also, once you actually sell, VG will tell you what the realized gains and losses are.