How can I get spotlight to recognise expressions like 8C5 or 7P4?

I want to do combinations and permutations with spotlight.

  • This looks like an XY Problem, so can you describe in more details which problem you are trying to solve here (without already making assumptions about the cause)? Also, just tried it here, Spotlight seems to be happy to search for these terms. What exactly doesn't work as expected for you?
    – nohillside
    Feb 26, 2017 at 13:40
  • @patrix I want it to give me the answer like it would for other calculations, so i can work faster. Feb 26, 2017 at 14:32

2 Answers 2


After proper transformations you can calculate at least simple combinations and permutations in Spotlight:

7P4=7!/(7-4)!=7!/3!. Entered in Spotlight as 7!/3! it will give you a proper result: 840.

C(8,5)=8!/5!(8-5)!=8!/5!3!. Entered in Spotlight as 8!/5!3! it will give you a proper result: 56.

For info on other advanced functions besides Factorial which Spotlight can handle, see this page

According to Google Search a WolframAlpha Spotlight plug-in for Flashlight (a Spotlight extender - link in the other answer) which should be capable of doing these kind of calculations once existed but I can't actually find it or it's gone.

With Google Chrome installed you can use a work-around and add the Wolfram | Alpha extension which supports expressions like in your question in the extra search bar:

enter image description here

enter image description here

  • This isn't what I'm asking. I know I can do this, but I want to do 7P3 Feb 26, 2017 at 16:46
  • @theonlygusti If you need a panacea code one yourself...
    – klanomath
    Feb 26, 2017 at 19:04
  • that is what this question is asking then. How do I code it? Do I need to make some full-blown app? I don't even know how to register a new spotlight "listener" from a macos app, if that is what i have to do... Feb 26, 2017 at 19:31
  • If you need help in coding, please ask specific questions on Stack Overflow. Coding questions are off-topic on AD.
    – nohillside
    Feb 26, 2017 at 19:58

There is no easy way to do this.

Spotlight has access to doing calculations with the built-in Calculator.app, so you can put in some simple arithmetic expressions. However, this app is not able to compute combinations/permutations.

There seems to be something you can install called Flashlight (http://flashlight.nateparrott.com) that will let you write custom plugins for Spotlight, so maybe that is a solution (I have never used it, so I don't know how easy or difficult it would be).

  • Flashlight won't work in this case (I already have it for other plugins) because arguments are space-separated from the function Feb 26, 2017 at 16:47
  • @theonlygusti Couldn't you make commands "Comb n k" and "Perm n k" (or even "C n k", "P n k")? It's better than typing in the whole formula, as suggested in the other answer. Feb 26, 2017 at 18:04
  • You're right, that could be a way to do it. However, I specifically want to know how I can do nCr Feb 26, 2017 at 18:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .