When you get two of the most powerful women in technology and business at the table, it's a sure bet the conversation is going to have some valuable advice.
Here are some of the biggest lessons from the "Lean in Live," a live-stream show hosted by Sandberg on Facebook.
Gates pointed out a disturbing trend — the number of women with computer science degrees has fallen dramatically since the 1980s.
"Talking about this, it kills me because these are great jobs," Sandberg said. Tech jobs "are high impact. You really make a difference in the world. They're often incredibly flexible, and they offer great salaries, great benefits."
"Along any metric a woman would want, this is a great opportunity," she added.
Both women encouraged other women to consider technology, computer science and engineering careers.
When Sandberg asked Gates to share advice she'd give her younger self, she replied: "My best advice would be to be yourself."
Gates described how she learned that lesson early on in her career.
"I was one of the very few women who had a tech background. When I first got [to Microsoft], I thought I had to be the same style as all the men in the room," she said. "I actually became very unhappy; I thought I was going to leave."
In your career, you shouldn't try to be anybody but yourself, she said.
"You have to get comfortable being uncomfortable," she added. "The more you lean in, the more you build the muscle."
In order to empower women in business and tech, we need groups of women and men supporting them, Gates and Sandberg said.
Sandberg discussed the power of peer mentorship, citing how her Lean In networking and support circles in computer science and engineering has grown to more than 7,400 members.
"We found that peer support can be so important," Sandberg said.
Furthermore, companies need to increase the number of women on their boards and in their C-suites, Gates added.
If "you have one woman on a board, she's not going to be able to make the change," she said. "You need several women on the board to make the change."
"Pull other women up with you," Gates said. "Bring them along."