The tax code provision addresses what’s called qualified small-business stock. It says that people who are invested in a company with assets valued under $50 million are eligible to exclude from their taxes $10 million or 10 times their investment, whichever is higher. It can be used by employees at start-ups who are given stock as part of their compensation plans.

“This is just an incredible way to exclude a large amount of income,” said Raymond L. Thornson, managing director at the accounting firm Andersen Tax in San Francisco. “What makes this unique is most of the opportunities to save on taxes are to give money away or deduct your mortgage.”

There are a few restrictions to the election, in addition to the size of the company when an employee receives shares. Workers must hold the stock for at least five years. And the stock must be in a business that makes something, including tech companies. That, in theory, excludes law offices, accounting practices, financial service firms and other service providers.

Silicon Valley technologists have garnered many benefits over the past few decades, but the tax-free boon from the qualified business stock is acting as a recruiting tool for some companies. And that’s because when it works out, as it did for Ms. Luo’s LinkedIn colleague Danis Dayanov, it really works out.

In his case, the tax savings were so significant that he was not sure they were real. Mr. Dayanov, an engineer who emigrated from Russia to work in Silicon Valley, said he had discovered the benefit not through his accountant but by playing around on TurboTax. The program asked him questions that led him to believe that the stock he received when he joined the company in 2003 would qualify.