How to Calculate GDP?

To calculate gross domestic product, add together consumption and government spending and investments and the difference in exports and imports.