Washington D.C.-based financial advice company HelloWallet has agreed to be acquired by Chicago-based investment research firm Morningstar, the two companies announced.

The deal was valued at a total of $52.5 million; Morningstar already owns a $13.5 million stake in HelloWallet and plans to pay $39 million for the rest of the company.

HelloWallet created an Internet cloud-based service to provide financial advice to users. A user might input their bank information, credit cards, retirement plans and employee benefits, and the software creates budgets and recommendations. The 50-person start-up’s clients include Marsh & McLennan, United Technologies and Salesforce.com.

Morningstar has been working with HelloWallet for the past couple of years so the acquisition was natural, according to HelloWallet founder and chief executive Matt Fellowes. Morningstar made its first early-stage investment in HelloWallet — $6.75 million — in January 2012, and the two companies co-market their financial advisory services to employers and 401k providers.

“We think with our focus on helping [users] find the money for savings and keeping their health together so they can maintain those savings, and Morningstar’s focus on really managing those savings . . . we provide a really holistic solution that’s not anywhere else,” Fellowes said.

Combining HelloWallet’s “expertise in behavioral and consumer research and analytics with Morningstar’s investment management capabilities” could help the two companies reach the retirement market, Brock Johnson, head of retirement solutions at Morningstar, said in a statement.

HelloWallet will maintain its office in the District and plans to hire more employees — especially engineers — and possibly expand its office space in the next few months, Fellowes said.