The simplest answer is that the value of the market for some asset is the open interest times the notional principal value. For example, for E-mini S&P 500 Futures, the contract size is $50 times the value of the index, which was recently about 1690. So the notional value of one E-mini futures contract was $84,500. On October 10th, the total open interest across five listed E-mini S&P contracts was about 2.71 million. So the value of the market for E-mini S&P 500 futures was recently about 2.71 million * $84,500, or $229 billion. That's not the whole market for S&P 500 index-linked products, obviously: there are also the "big" S&P 500 futures, which have a contract multiplier of $250 and 158k in open interest, and then there are many mutual funds, exchange traded funds, options, and other products whose value is all tied to that of this one equity index.
Where the numbers become even more interesting and/or fodder for excitable people is when you look at other assets, like currency pairs or interest rate swaps. In the years after the Great Recession, it was common to find articles referencing the systemic risk ostensibly posed by over-the-counter (OTC) derivatives markets, whose notional value outstanding is often quoted in much larger numbers. For instance, as recently as March 2013, a columnist for TIME offered to explain " Why Derivatives May Be the Biggest Risk for the Global Economy," except if you click through there you may be disappointed with the level of hypesmanship, since the article is really just about how OTC markets are opaque and are not "properly regulated."*
A key ingredient in any argument from ignorance is a really large impact: if you can't assign a credible probability to something, you really want to at least be clear about how great or awful it would be if the uncertain thing came true. So: "While there's no way of knowing for sure, estimates of the face value of all derivatives outstanding tops a quadrillion (1,000 trillion) dollars, or more than 14 times the entire world's annual GDP."** So, even though there's no reason to think that any particular derivatives market is in any particular danger of anything, using the open interest times notional value method above, we get to talk about really huge "face value" numbers, and hey, you never know what might happen, so let's wring our hands for a minute. There is one solid rowdy moment in the column, the final sentence: "Overall, the markets are extremely leveraged, which means that any miscalculations could have a domino effect. And in theory, at least, the total losses could add up to more money than there is in the entire world." You can decide whether that rhetorical payoff justifies the promise of the column title.
The fact that makes "all the money in the world" claims like this utter nonsense is that such claims confuse the notional value of outstanding contracts with the actual market value of the contracts. Here's a primer from PIMCO on interest rate swaps, and the key sentence to pull from that is: "Swap volume is termed 'notional' because principal amounts, although included in total swap volume, are never actually exchanged. Only interest payments change hands in a swap." The fixed- vs. floating-rate payments associated with a swap are what's at stake, not the much larger notional amount on which those payments are based. Additionally, payments on derivatives like this are usually netted out, such that the party that owes more on a given date will just transfer that difference, instead of both parties to a swap exchanging the full payment amounts. And the practice of posting collateral further reduces the risk to such positions.
In the case of listed derivatives like S&P 500 futures, there is a similar difference between the notional value outstanding and the actual size of the market. The latter figure is much smaller and for similar reasons. A trader who has bought an S&P 500 futures contract did not post the notional value of the contract in cash upon purchase. She posted initial margin worth roughly 5% of the notional value to enter the position. And futures are settled daily, so if the change in the underlying asset has brought the value of her margin funds below a certain threshold (the maintenance margin requirement), she will be required either to post additional funds or to close the position. I said above that the answer that matters is different from the "open interest times notional value" calculation for the size of a market. The answer that matters is how much margin market participants have posted and would be willing to post in that market to maintain their positions; for example, how many traders would be willing to continue posting funds to meet margin calls for every 10% drop in a stock index? Approached from this perspective, listed and OTC derivatives markets are much smaller and less risky than they might otherwise appear.
* You would think a phrase like that would be followed by a clear reference to what propriety amounts to in this case, but no. Instead, we get a mushy list of all of the various regulatory pokes: the Volcker rule limits on proprietary trading, a plea for the days of Glass-Steagall, more transparency, greater capital requirements. Only capital requirements matter, and those are not only higher but banks are on track to meet them. I guess "decisive regulatory action has been taken" kind of ruins the agnostic theme of the piece.
** A problem with any derivatives vs. GDP comparison is that the value of a market or asset class is a stock variable - a snapshot at a point in time - while GDP is a flow variable, measured typically in dollars per year. The two can't be meaningfully compared. We could be logical positivists about this, rule the proposition meaningless, and go smoke cigarettes in Vienna, but for the sake of completeness let's continue.