Yes, you can patent a formula, but only certain types and only under specific conditions. The answer depends entirely on what kind of formula you mean. A chemical composition, a food recipe, or a cosmetic blend can often qualify for patent protection. A pure mathematical equation or abstract algorithm cannot. The distinction comes down to whether your formula has a practical, real-world application or exists only as an idea.
What Patent Law Actually Says
U.S. patent law recognizes four categories of patentable inventions: processes, machines, manufactures, and compositions of matter. A “composition of matter” is defined as any combination of two or more substances, whether the result of chemical reaction or mechanical mixing, and whether the final product is a gas, fluid, powder, or solid. This is the category most formulas fall into.
To qualify, your formula must meet three core requirements. It must be novel (no one has done it before), non-obvious (a person skilled in your field wouldn’t consider it an obvious next step), and useful (it has to do something practical). Meeting all three is harder than it sounds. If your formula is a slight tweak on something that already exists, or if anyone with expertise in the field would arrive at the same result, the patent office will reject it.
Chemical and Pharmaceutical Formulas
Chemical compositions are some of the most commonly patented formulas. A new drug compound, a novel polymer blend, or a unique cleaning solution can all qualify as compositions of matter. What matters is that the specific combination of ingredients, their proportions, or the process used to combine them produces something genuinely new.
You don’t need to invent entirely new chemicals. Combining known substances in a new way that produces unexpected results, like improved stability, better absorption, or a longer shelf life, can be enough. The key word is “unexpected.” If the benefit is something any chemist would predict from combining those ingredients, the patent examiner will likely find it obvious.
Food Recipes and Cosmetic Formulations
Food and cosmetic formulas are patentable in principle, since they’re compositions of matter. In practice, they face a higher bar because many recipes use common, well-known ingredients. Simply combining flour, sugar, and eggs in slightly different ratios won’t qualify. Your formulation needs to produce a result that’s meaningfully different from what already exists.
Where food and cosmetic patents succeed is when they involve unusual ingredient combinations, specific processing conditions that change the final product’s properties, or novel functional benefits. A protein bar with a specific ratio of ingredients that stays shelf-stable for twice as long as competitors, or a skincare formula where the ingredients interact to increase absorption significantly, could meet the threshold. The patent would typically cover the specific composition and proportions, not just the general idea of combining those ingredients.
One practical concern: enforcing a food or cosmetic patent is difficult if competitors can’t easily determine your exact formulation from the finished product. This is one reason many companies in these industries choose trade secret protection instead.
Mathematical Formulas and Algorithms
Pure mathematical formulas cannot be patented. Courts treat them as abstract ideas, a category of “judicial exceptions” that falls outside patent eligibility. The landmark 1972 Supreme Court case Gottschalk v. Benson established this principle when the Court rejected a patent on an algorithm for converting numbers between formats, reasoning that granting it would effectively give someone ownership of the mathematical formula itself.
However, a mathematical formula applied to solve a specific, concrete problem can be patentable. The legal test asks two questions: Is the claim directed at an abstract idea? If so, does it include something “significantly more” that transforms it into a practical application? Patent attorneys call this the “inventive concept” requirement. A formula that controls a specific industrial process, improves a particular technology, or produces a tangible result tied to a real-world application can clear this bar. The formula alone cannot.
This distinction matters for software developers and data scientists. You can’t patent the equation behind your pricing model, but you may be able to patent a system that uses that equation in a specific technical way to produce a concrete improvement.
Trade Secrets as an Alternative
Patenting a formula isn’t always the best strategy, even when it’s legally possible. A patent requires you to publicly disclose your formula in full detail. Anyone can read it. The protection lasts 20 years from the filing date, and after that, your formula is free for anyone to use.
Trade secret protection works differently. It lasts indefinitely, as long as three conditions hold: the information has economic value because it’s not publicly known, others can’t easily figure it out through legitimate means, and you take reasonable steps to keep it secret. Coca-Cola’s recipe is the classic example. It has never been patented. Instead, the company has relied on trade secret protection for over a century.
The tradeoff is real. A trade secret gives you no legal protection if someone independently discovers your formula or reverse-engineers your product. A patent gives you the right to stop anyone from using your formula for 20 years, even if they figured it out on their own, but it expires and your formula becomes public knowledge permanently. For formulas that are easy to reverse-engineer, patents are typically the stronger choice. For formulas that are difficult to deduce from the finished product, trade secrets often make more sense.
What Filing a Patent Costs and Takes
If you decide to pursue a patent, expect the process to take time and money. The USPTO charges government fees that add up to roughly $2,000 for a basic utility patent application: $350 for filing, $770 for the search fee, and $880 for the examination fee. These are large-entity rates as of early 2025. Small entities (under 500 employees) pay half, and micro entities (individuals or very small organizations meeting specific income criteria) pay one quarter.
Those are just the government fees. Attorney costs for drafting and filing a patent application for a chemical or formulation patent typically run between $8,000 and $15,000 or more, depending on complexity. The entire process from filing to a decision usually takes two to three years, sometimes longer. You’ll likely receive at least one rejection letter from the examiner that requires a formal response, which adds both time and attorney fees.
A less expensive first step is a provisional patent application, which costs $320 in government fees for large entities and can be filed without formal claims. It gives you “patent pending” status and holds your filing date for 12 months while you decide whether to invest in a full application. You must file the complete nonprovisional application within that year, or you lose the priority date.

