As Tyler and I explain in our textbook, GDP is the market value of all finished goods and services produced within a country in a year. Sounds simple but there are always edge cases including whether or not illegal goods should count towards GDP. According to the definition, illegal goods should count towards GDP. But in practice they often don't. In part because some people think that counting illegal goods would signal approval (or that not counting them signals disapproval) but also because it's hard to count the market value of illegal goods. Do we really expect the BEA to survey drug dealers and prostitutes about the price of their goods and services?
But what happens when an illegal good is legalized? The market value of any finished legal good should definitely count towards GDP but just adding it to GDP on the day of legalization causes problems. Did the economy boom the day pot was legalized? Did the recession end that day? Did we all become wealthier? Some countries shrug and just add footnotes.
But when Canada legalized pot in 2018, Statistics Canada decided not just to add pot to GDP but to backdate all their previous GDP statistics to create a consistent series. The Walrus has the interesting story.
So does pot contribute to GDP? It does in Canada but not in the United States!
Neither Canada nor the United States include prostitution in GDP although the Netherlands does. The United States has higher GDP per capita than either the Netherlands or Canada but if we included pot and prostitution our GDP per capita would be even higher and would better reflect our true standard of living relative to these other countries!