When Mark Zuckerberg was 19 years old, he launched Facebook from his Harvard University dorm room. (Some cynics might say "stole" is a better word than "launched," but who wants to start that debate?) Since then, he's made Facebook one of the internet's most valuable brands. And as he's done it, his net worth has climbed as high as $81.6 billion, making him the world's third-wealthiest man behind Amazon founder Jeff Bezos and Microsoft co-founder Bill Gates.

At least, that was the case until July 25. That day, just after the market closed, Facebook released its second-quarter earnings. Revenue was up — but not as much as investors had hoped. When the market opened the next morning, investors unfriended the stock big-time. Zuckerberg saw $16.8 billion of his stash evaporate in the first hour of trading. (Shareholders as a group lost $120 billion.) That's roughly the total salaries of all 1,696 players in the National Football League. (Not a football fan? It's also enough to buy the Yankees, Dodgers, Cubs, Giants, and Red Sox combined.)

So at this point, Zuckerberg is hardly even rich anymore. But while he and his wife are tightening their belts, scrounging for change in the couch cushions, and debating whether to keep the HBO, we got to wondering what our friends at the IRS think of the news. The answer, not surprisingly: "it's complicated."

Zuckerberg owes tax on his regular income as soon as he earns it. But his salary is just a dollar a year, which doesn't leave much for Uncle Sam. Of course, he also gets some nice perks. Facebook spent $7.3 million on Zuckerberg's security last year. (Fortune 500 companies can't just hire a bunch of knuckle-dragging goons to trail their CEOs. Top bodyguards, who come from federal agencies like the State Department or FBI, command six-figure salaries, and Facebook's security chief served on former Vice-President Joe Biden's Secret Service detail.) That protection is taxable, too.

But the real action, for a tech entrepreneur like Zuckerberg, is in the stock. Facebook announced last September that Zuckerberg plans to sell 35 to 75 million shares — worth between $6 billion and $12.5 billion — to finance his charitable limited liability company. He'll owe tax on those sales, but he'll get corresponding deductions for much of the cash he donates. In fact, last year's Tax Cuts and Jobs Act made those gifts even more valuable, raising the deduction limit from 50% to 60% of his adjusted gross income.

The IRS gets another whack at the rest of Zuckerberg's stock at his death. Considering he's just 34, that probably won't be for a while. But at that point, at least under current law, they'll download 40% of his taxable estate over $11.18 million. Now, unless Facebook implodes like MySpace, Zuckerberg should still be worth billions at his death. But — Zuckerberg and his wife have announced plans to leave 99% of their fortune to charity. Charitable bequests aren't subject to that 40% tax, which leaves the IRS scrounging for crumbs from whatever table scraps the pair leave for their kids.

The bottom line here is that the IRS had no reason to regret Zuckerberg's terrible, horrible, no good, very bad day, because his smart tax-planning means they wouldn't have gotten into a relationship with the stock anyway. The good news for you is that you can put the same sort of planning to work for yourself. And you don't even have to lose $16 billion in a day to do it! Just direct-message us when you're tired of paying more than you have to. We're sure you'll "like" the savings!