Owning a McDonald's franchise can be a lucrative business, but it requires a lot of cash.

The average McDonald's restaurant generates $2.5 million in sales annually, making it the second-highest-grossing chain in the US by sales per unit behind Chick-fil-A, according to QSR magazine.

But to open a single restaurant, the company requires that potential franchisees have liquid assets of at least $750,000.

Startup costs, which include construction and equipment expenses, average between $955,708 and $2.3 million, according to McDonald's. The total is determined by the geography and size of the restaurant, as well as by the selection of kitchen equipment, signage, style of decor, and landscaping, the company says.

Franchisees must pay 40% of the startup costs with cash and other non-borrowed resources, while the rest can be financed.

In addition to those costs, McDonald's charges a $45,000 franchisee fee and an ongoing monthly service fee equal to 4% of gross sales. Franchisees must also pay rent to the company, which charges a percentage of monthly sales.

Franchisees have historically paid about 8.5% of sales in rent costs, though some pay as much as 12%, according to a 2013 Bloomberg report.

McDonald's franchisee startup costs are similar to those of KFC, Wendy's, and Taco Bell.

Subway, by comparison, is far less expensive, costing between $116,000 and $262,850, according to the company. Subway also requires minimum liquid assets of only $30,000 to $90,000.