Consumption
One method of calculating GDP is to sum the producer prices for all final products and services sold in a period of time. A final product is consumed by the end customer. For example, a bicycle tire sold to a bicycle manufacturer isn't a final product because the manufacturer doesn't use the tire but includes it in their product. This avoids double counting the same value production.Investment
In addition to consumption, investments by businesses and consumers are included in GDP. On the consumer side, this is mostly the purchase of a home. On the business side, the purchase or development of tangible or intangible capital is included†. For example, the development of software or purchase of a machine. It should be noted that financial investments such as the purchase of a stock isn't included in GDP as this would be double counting.Net Exports
Anything that you export is added to GDP and anything you import is subtracted. This makes intuitive sense. If an American purchases a German car, this doesn't represent production of value by America. As such, this must be subtracted if it was initially added in as consumption.Government Spending
Government spending such as investment in a hospital or the operational costs of a school are included in GDP.Purchasing Power
GDP can be calculated in a local currency. Nations can be compared by converting to a dominant currency such as the US dollar. This can be misleading as this doesn't capture the true purchasing power of the GDP. If goods are expensive in one nation and inexpensive in another, the effective purchasing power of people in the inexpensive nation is higher for the same GDP. As such, GDP per capita doesn't accurately measure purchasing power or standard of living.Nonfinancial Value
GDP doesn't capture nonfinancial value creation. For example, a city opens a park and allows people to enter for free. This isn't counted in GDP beyond some minimal operational costs. If the same city were to charge a fee for entrance, GDP would be increased. This is an obvious example whereby GDP doesn't directly map to quality of life as nations and cities with a high quality of life produce a great deal of nonfinancial value that doesn't get counted in GDP.Economic Bads
GDP doesn't subtract the production of economic bads such as air pollution. For example, a factory that produces widgets worth $1 with a process that causes $10 damage to the local environment for each widget. This would be counted as $1 GDP as opposed to -$9.Broken Windows Fallacy
As government spending increases GDP, governments can artificially inflate GDP in the short term by spending money. This is only sustainable where the spending builds society up such that the value of the nation's currency isn't destroyed over time. For example, it is a common misconception that destructive processes such as war or earthquakes are "good" for GDP. This is generally incorrect due to the broken window fallacy (below).Broken Window Fallacy
If a girl breaks a school window with a rock, the government needs to spend $100 to fix the window. This will boost GDP by $100 such that it is good for the economy.
Why This is a Fallacy
By spending $100 to fix a window, the government has an opportunity cost whereby they could have spent the $100 on improvements such as 10 new textbooks. As such, breaking the window increases GDP but doesn't create value and can't be considered "good" for the economy. In fact, it causes damage as investments in the future could have been purchased with the same funds.
Practical Example
A nation has a large earthquake and spends $1 trillion to partially fix the damage. This boosts GDP by $1 trillion. A naive economist might view this as a positive for the economy. However, this is a fallacy. If the earthquake had not occurred the $1 trillion could have been spent on hard or soft infrastructure. For example, it could have been used to build and sustain a large number of public universities that could have dramatically boosted the future economic output of the nation.
Be Careful What You Measure
Be careful what you measure is a well known business truism that states that employees will aggressively change their behavior based on what numbers you use to measure their performance. This can have unintended consequences. For example, if a hotel only measures revenue, aggressive marketing and billing practices will rise and customer service will fall. If they only measure customer satisfaction, revenue will fall as employees easily give free upgrades to gain customer satisfaction points. The same concept can be applied to GDP whereby governments may cause damage to quality of life or long term GDP in the pursuit of short term GDP gains.GDP Formula
There are multiple ways to calculate GDP that are all supposed to arrive at the same result. The examples above are based on the Expenditure approach and this formula:
GDP = consumption + investment + government spending + net exports (exports - imports)