Mozilla launched Firefox in November 2004 as an alternative to Microsoft’s (MSFT) Internet Explorer browser. It briefly surpassed Internet Explorer as the most popular browser in 2009 due to its add-on features and greater security protection. Since Google (GOOG) Chrome’s release in December 2008, its market share has steadily increased to 63.7 percent while Firefox’s market share has dropped to roughly 22 percent.

Why did Google wait so long to create a browser? Executive Chairman Eric Schmidt didn’t want to: he was afraid of the company growing too fast and didn’t want to start a new browser war. However, once convinced Chrome was born and, it is claimed, has become a very profitable part of the company. So how do these two browsers make money?

Mozilla Firefox

Mozilla releases its annual financial statements each November for the previous year. The company’s latest revenue numbers are from 2013 when the browser brought in $314 million, 97 percent of which came from royalties. These royalties refer to the percentage of advertising revenue Mozilla receives whenever someone uses the built-in search engine that the Firefox browser provides. Of Mozilla’s 2013 revenue, $275 million came from a single search engine. While the Mozilla Corporation doesn’t share the name of the company, it’s safe to assume that the money came from Google.

In addition to search royalties, Mozilla earns money from donations and from sponsored new tab tiles, which can be disabled.

Firefox and Yahoo

For the past decade, Mozilla and Google had an agreement that made Google the default search engine in Firefox. In November 2014, however, Mozilla announced that the partnership was over and that Yahoo! (YHOO) would be Firefox’s new default search engine for the next five years. Whether or not this new development will be lucrative for Mozilla will only be seen when the 2015 financial reports are issued in November 2016. Initial analysis shows that many users are manually switching their default search engine back to Google.

Google Chrome

Examining Google Chrome’s revenue is much harder since Google doesn’t list the revenue and expenses for all of its services. This means that while Google claims the browser is “an exceptionally profitable product”, the public isn’t able to verify this information.

Let’s assume, though, that the browser is profitable. How does it make money? The simple answer is the same as Mozilla Firefox. Google receives money from advertisers but, instead of paying out search royalties to other browsers, the money is transferred to the Chrome part of Google. Simply put, Chrome makes money by saving Google royalty expenses.

Additional Benefits of Google Chrome

Google has indirect ways of making money. For starters, when people use Google Chrome, they are more likely to use a related service—Gmail, Google Apps, Google Docs, etc.—which, in turn, leads to even more usage as the company’s products are highly integrated with each other. Each time a product is used, page views go up and ad revenue increases.

Secondly, Google’s AdSense program is really interested in your data. Chrome tracks user data and uses it to improve its AdSense program. With more data, each user’s marketing profile can be better understood and ads can be better targeted to potential customers. By promising more effective ads, AdSense is able to charge a higher price for advertising than its competitors.

The Bottom Line

Owning a browser is big money, especially if the browser is as popular as Firefox. Through the years, whenever Mozilla’s contracts to have Google as their default search engine were ending, there were other search engines ready to pay them money for the default slot. In 2014, the partnership ended, and now Mozilla earns most of its revenue from royalty money from Yahoo while Google pays itself and collects data to sell more expensive ads.