Before getting more women in the boardroom, we need more women who work in cubicles to stay long enough so they can attain leadership positions.

Legions of female college graduates are entering the workforce with lofty aspirations about becoming executives. In fact, more women than men aspire to top management when they are in the first two years on the job, according to a report on gender parity published recently by Bain & Company.

Then, something striking happens.

After as little as two years on the job, many women lose their ambition – measured by whether they seek executive roles – by more than 60%, while men’s ambition level stays the same. Among experienced employees, just 16% of women aspire for a top job compared with 34% of men. Also, as they move up the ranks in their career, women’s confidence falls by about half, while men’s stays unchanged.

Partly as a result, women fill only 5% of CEO roles at Fortune 500 companies and comprise 17% of board members.

“The difference is striking,” says Julie Coffman, partner with the Bain & Co. Chicago office and the chair of Bain’s Global Women’s Leadership Council. “We need to unpack what is happening during those early to mid-level years of a career that is changing these aspiration and confidence levels so dramatically.”

An easy explanation would be that more women than men take time off work to have children and start families. Yet when Bain took a deeper look at the data, marital and parental status did not significantly differ for women who aspire to the C-Suite and those who don’t. Instead, Bain’s research indicated that women’s confidence and aspiration levels erode because they don’t feel supported by their supervisors and they had a hard time fitting into stereotypes of success within the company. Women have far fewer role models in senior and top management than men do.

To bridge the gap, direct supervisors at a mid-management level – as opposed to human relations or leadership teams – need to fundamentally drive employee loyalty and engagement, says Coffman. To do this, companies need to convince frontline managers that investing time into getting to know their employees makes good business sense.

But with so many mid-level managers working within any given organization, Coffman said the proposition can be challenging. Yet training and encouraging managers to be more intentional on the impact they have on the trajectory of their direct reports’ careers is key, she added.

“It’s convenient to point to the boardroom and say it’s a quick fix to appoint some leaders and we’re done,” says Coffman. “The harder work is at the mid-level when everyday you have a supervisor and a supervisee interacting. You have those moments of truth where you are either nurturing those aspirations and cultivating that confidence or you are not.”

Training and encouraging managers to be more intentional on the impact they have on the trajectory of their direct reports’ careers is key, she added.

Indeed, other studies have pointed to additional problems that may be preventing women from attaining leadership roles in corporate America. Unconscious bias against women leaders and overt discrimination against promoting women are also problems ingrained in many work cultures that executives teams need to actively work against.

Eve Ellis, a financial adviser with the Matterhorn Group at Morgan Stanley Wealth Management, agrees that investing resources at a mid-level to foster women’s career aspirations is a “no-brainer.” Ellis co-runs a fund at Morgan Stanley — the Parity Fund — that only invests in companies that have demonstrated a commitment to including women on their corporate boards. The key to getting more mid-level managers to take the diversity proposition seriously is to pitch it to them as a clear business objective, she says.

To subscribe to Caroline Fairchild’s daily newsletter on the world’s most powerful women, go to

Read next: Activist investors’ unintentional war on women