You can learn more about costs basis here, including all the different methods Vanguard can calculate how much you've gained or lost on your investments.
Tax education center
Paying taxes on your investment income
How much will you owe? First, figure out what type of income you earned.