Can You Patent an Algorithm in the US? What the Law Really Says

Can You Patent an Algorithm in the US?

If you’ve built something clever, a piece of code, a formula, a way of processing data that actually works better than what’s out there, you’ve probably wondered whether you can lock it down legally. It’s a fair question. Algorithms run almost everything now, from search engines to recommendation systems, and the people who build them naturally want to protect their work.

So, can you patent an algorithm in the US? The honest answer is: not exactly, but sort of. Stick with me here, because the distinction actually matters a lot, and it’s the difference between a patent that gets approved and one that gets rejected outright.

Why Algorithms Are Tricky Under Patent Law

Here’s the core issue. US patent law does not allow you to patent a pure mathematical formula. That’s been true since a 1972 Supreme Court case called Gottschalk v. Benson, where the Court refused to let someone patent a formula for converting binary-coded numbers. The reasoning was simple: if you patent the math itself, you basically own the math, and nobody else could use it, even in totally unrelated ways.

So an algorithm, by itself, sitting there as an abstract set of steps, isn’t something you can own. But that’s not the end of the story.

The Part Most People Miss

Nine years after that Benson case, the Court decided a different case, Diamond v. Diehr, and this one went the other way. A company had used a math formula as part of a rubber-curing process, and the Court said yes, this can be patented, because the patent wasn’t really about the formula. It was about a specific industrial process that happened to use math as one piece of it.

That’s the pattern you need to understand. You can’t patent the algorithm itself, but you can often patent a real-world process, system, or improvement that uses the algorithm to do something concrete. The math is just a tool inside a bigger invention.

How the USPTO Actually Decides

Since 2014, the USPTO has leaned on something called the Alice/Mayo test, named after the Supreme Court case Alice Corp. v. CLS Bank. It’s a two-step process examiners walk through for every software or algorithm-related patent application.

Step one asks whether the claim is essentially just an abstract idea, math, or something that exists in nature, dressed up in technical language.

Step two, if the answer to step one is yes, asks whether there’s something extra added that makes it more than just the abstract idea. This is often called an “inventive concept,” and it’s usually the make-or-break factor.

In plain terms, examiners are trying to figure out if you’re patenting a real invention or just wrapping an idea in fancy wording and hoping it slips through.

What Actually Gets Approved

Real examples make this a lot easier to understand. Here’s what tends to work:

  • Using a math formula to control a physical, industrial process
  • Improving how computer hardware actually performs, like a new way of structuring data
  • Solving a specific technical problem in a way that didn’t exist before

And here’s what usually doesn’t work:

  • Using math simply to organize information or business data
  • A general algorithm with no connection to a technical improvement
  • An idea that could just as easily be done with pen and paper

Google’s PageRank algorithm is a well-known success story here. It wasn’t patented as “a formula for ranking things.” It was patented as a specific technical method for ranking search results based on link structure, tied to a real, working system. That distinction is everything.

Patent vs Copyright

A lot of confusion around this topic comes from mixing up patents and copyrights. Here’s a simple way to see the difference:

ProtectionWhat It CoversExample
PatentA technical process or application using the algorithmA method that applies an algorithm to improve computer performance
CopyrightThe actual written code itselfThe specific lines of source code you wrote
Trade SecretConfidential methods you choose not to discloseAn internal ranking formula you keep private

Most companies actually use a mix of all three, depending on which part of their algorithm they’re trying to protect and how public they’re willing to make it.

Steps to Take If You Want to Patent Something Algorithm-Based

  1. Identify the technical problem your algorithm solves. Not the business benefit, the actual technical issue.
  2. Frame it as an application, not a formula. Focus your description on the specific system or process, not the raw math.
  3. Run a prior art search through the USPTO database to see if something similar already exists.
  4. Work with a patent attorney who has software experience. This area of law shifts often, and generic legal help usually isn’t enough.
  5. File a provisional application first if you need more time to build out the full technical description.
  6. Prepare for scrutiny. Algorithm-related applications get more pushback from examiners than most other patent types, so expect follow-up questions.

How Long It Takes and What It Costs

This isn’t a quick or cheap process, and algorithm patents tend to take even longer than average because of how carefully examiners review them. Expect somewhere between one and three years for a decision, sometimes longer if there are multiple rounds of objections. Costs typically start around a few thousand dollars for a provisional filing and can climb well past ten thousand once a full application and attorney fees are factored in.

Given the cost, many companies choose to keep certain algorithms as trade secrets instead of patenting them, especially when the method is hard for competitors to reverse-engineer anyway.

Frequently Asked Questions

1. Can I patent an algorithm just by writing the math down? No. A pure mathematical formula, on its own, isn’t patentable. You need to show it’s applied to solve a specific technical problem in a real system.

2. Can AI and machine learning algorithms be patented? Sometimes, yes. The USPTO has issued guidance recognizing that new machine learning techniques, like specific training methods or data structures, may qualify if they meet the same technical-application standard.

3. What’s the difference between patenting an algorithm and copyrighting code? A patent can protect the underlying process or method, while copyright protects the actual written code itself. Many companies use both together for full protection.

4. Why do algorithm patents get rejected more often than other patents? Because of the abstract idea exception. Examiners are specifically trained to catch claims that are really just describing math or organizing information without a technical application attached.

5. Should I patent my algorithm or keep it as a trade secret? It depends on how easily competitors could reverse-engineer it. If it’s easy to copy once released, a patent may be worth the cost. If it’s genuinely hard to detect or replicate, a trade secret might make more sense.

Final Thoughts

Can you patent an algorithm in the US? Not directly, but you can very often patent the real-world process, system, or technical improvement built around it. The key is shifting your thinking away from “protecting the formula” and toward “protecting the application.” If you’re serious about this, get a patent attorney with software experience involved early. The way your application is framed can be the entire difference between approval and rejection.

External References

Leave a Comment