Getting A Sum (Adding Up) From A List Of Numbers In iOS Shortcuts

I am here because I have literally pulled every hair out of my head (well, not literally every hair… and ok - I was already bald :stuck_out_tongue_closed_eyes:) trying to figure out a simple (and fast) way to take a list of numbers in iOS Shortcuts and add them all up.

I’ve accomplished it through Toolbox Pro’s global variables, but it’s clunky and extremely slow! I need something that will work more elegantly. It seems like such a basic task that there should already be an action for it… grr!

I couldn’t find any help anywhere else. I’ve made my eyes bleed :drop_of_blood: from useless google searches as old of a search pro as I am, the most seemingly relevant results Google wants to offer up are topics like “best and most useful iOS Shortcuts!” Or “How to use iOS Shortcuts”… :confounded:

I don’t need a tutorial on the basics. I am already a pretty seasoned pro. I just think when Apple made this, they thought nobody would EVER need to change a variable after they set it. I mean … no way right?

Well, I hope you guys can help put my faith back into humanity and into Apple iOS Shortcuts.

Thank you!

I think the Calculate Statistics action does what you’re looking for:


Thank you so much Chris. In fact I love your whole name.

You are literally an answer to my prayers. I have struggled with this problem for so long literally days and days and days. How I didn’t see such a simple action under math, I really have no clue!

This is really going to help me so much from now on.

Basically my faith in humanity is restored and also my faith and interest in forums. I am now going to turn around and become not just an active user, but also an active contributor.

God bless you Chris!


OMG you’re hilarious

Based on your question, I’m guessing you have some previous programming experience. That’s probably leading you down the wrong road when it comes to shortcuts. I’ve experienced the same thing. As a programmer I’m used to building everything up from fairly elemental constructs (loops, variables, etc.).

With shortcuts, the way to go is to look for individual actions that get you as far towards your destination as possible. Don’t default to manipulating data at a low level unless there isn’t any predefined action that can do it for you.

That is exactly right. I think my brother who is a professional developer had it good when I helped him with his first shortcut. He didn’t have to struggle for weeks to figure out the simple actions he needed.

What’s telling is that Apple didn’t even include Calculate Statistics in the search for Math.

This is a HUGE oversight on their part. They really need to fix this.

Obviously since they aren’t including all relevant results in search, how am I to be sure I know what all is there? Just browse the seeming endless lists I guess.

Calculate Statistics also doesn’t appear if you search for Add but does appear in the search results for Sum, which, ironically, is the original title of this thread “Getting a Sum…”