Running a business in its simplest explanation is taking inputs, adding value to the inputs, and then selling the output to make money. To that end, Brown-Forman (NYSE:BF-B) and Dunkin' Brands (NASDAQ:DNKN) have each found ways to take commoditized products and turn them into something consumers will pay a lot of money for, thus creating fantastic businesses.

Corn whiskey
Being a corn farmer is a rough business. You work long, hard hours, and then you basically have to sell your product for whatever the market is willing to pay you. That isn't an overly favorable situation.

Brown-Forman, on the other hand, buys that corn, dries it up, grinds it into cornmeal, mixes the cornmeal with water and yeast, boils ethanol out of the mixture, and lets it sit in a barrel for a couple of years -- and voila: Jack Daniel's. Of course, that was an overly simplistic version, but by going through this process it has created a product that consumers love and will pay plenty of money for.

Brown-Forman creates other liquor brands as well, but Jack Daniel's is the most prominent. Other factors that make Brown-Forman's business attractive from an investor standpoint are its highly regulated industry and its standing as one of the oldest and best-known players in its market.

Because of the nature of this business, it isn't feasible for someone to simply open up shop and begin to compete. There are many regulations, as well as a long waiting period after the initial investment, before any sales start to roll in. And there's the high level of competition from Brown-Forman and others.

These are all factors that have helped Brown-Forman achieve steady earnings growth of over 8.5% per year on average over the past 10 years, along with an average profit margin in the same time period of almost 17%.

The buzz on coffee
Dunkin' Brands has used a different method to create a similar outcome as Brown-Forman. Dunkin' sells coffee, which, like corn, is a commodity and is priced solely by the market. Again, not a favorable business.

Dunkin' doesn't convert the coffee into anything different, the way Brown-Forman turns corn into alcohol, but Dunkin' has added a fine brand and convenience to the commodity, which is something investors pay for.

Buying store-brand coffee in a tub and making it at home is obviously much cheaper than going out for coffee every morning. However, Dunkin' has succeeded in making consumers see value in the Dunkin' Donuts name on the side of the cup containing their freshly brewed, premium coffee every morning.

The company has also succeeded in creating a convenient option that consumers pay for. Just last week I stopped into a Dunkin' Donuts and ordered a medium coffee and bagel with cream cheese, and within one minute I had the coffee in my hand. Within another three minutes I was back in my truck and on the road again, with my wallet only around $3.50 lighter.

Dunkin' Brands also franchises nearly 100% of its stores, meaning the company gets a royalty fee based on sales from both its Dunkin' Donuts and Baskin-Robbins stores. This is just another factor investors should like, as Dunkin' Brands grows with the top line of its stores but is not exposed to store-level operations, which can be troubling in many cases.

Like Brown-Forman, Dunkin' has fared well, growing earnings over 33% a year the past five years on average, and sporting a profit margin over 20% in the past fiscal year.

Fool's take
If you're a true long-term investor, you wouldn't wnat to buy fad companies that don't have some sort of competitive advantage in their business model. Both Dunkin' and Brown-Forman have incredibly strong brands, which bring incredibly strong brand loyalty. They also both employ several other favorable advantages in their business models.

The market apparently likes both of these companies as well, as Dunkin' currently trades around 36 times earnings and Brown-Forman around 30 times, compared with a market average of 18.

So right now, even though they may be priced at a premium, you could still buy knowing you're getting pieces of excellent companies that will help your portfolio for many years to come. You could use each company's dividends to cost average further purchases at any price level and would most likely be satisfied holding these stocks for a long time to come.