WASHINGTON—Supreme Court justices sought to find the line distinguishing abstract ideas, which are available to all, from patentable software inventions, during an hour of argument that touched on innovations ranging from the ancient abacus to the shopping platform of Amazon.com.

"A natural phenomenon, a mathematical formula, those are easy to identify," said Justice Ruth Bader Ginsburg, citing two types of discoveries that...