Payroll startup Gusto has raised $140 million from investors in its most recent funding round, bringing the company valuation up to around $2 billion.

The funding is led by late-stage investors by T. Rowe Price Associates, MSD Capital (Michael Dell) and Dragoneer Investment Group, with participation from Y Combinator Continuity Fund. The funding will be used to further develop Gusto’s all-in-one payroll, benefits and HR technology platform, including its most recent offering, which allows employees to choose when they get paid.

The group recently announced the launch of its new Flexible Pay option, which will all,ow employees to bridge the gap before payday by accessing money they have already earned in that month. With integrations to time sheet services and proper risk modeling, Gusto’s platform can predict what a worker has already earned, and can front the money at minimum risk to itself.

Josh Reeves, Gusto co-founder and chief executive officer, said the company was preparing for an eventual public market debut. “Our timing to IPO is probably in the three- to five-year time horizon,’’ Reeves said. “We want to have a clear pathway to going public.’’

Gusto was founded in 2011 as ZenPayRoll by Edward Kim, Joshua Reeves, and Tomer London and now processes tens of billions of dollars of payroll, as well as empowering employers to provide benefits like health insurance.