You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

💡 Did you know?

⏺ If you can't accept iCloud Terms and Conditions... Learn more >

⏺ If you don't see your iCloud notes in the Notes app... Learn more >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

iPhone Calculator Wrong Order of Operations?

On my Mac's calculator entering in


100-50/2 = 25


On iOS7 on an iPhone 4S entering in


100-50/2 = 75


Hitting clear a bunch of times, even AC and trying


100-49/2 = 75.5


On the Mac's calculator it's


100-49/2 = 25.5


Is this normal or am I just doing something wrong?


On the Mac you don't have to hit Equal after 100-50 but it seems you do on the iPhone which seems bizarre.


Any ideas?

Posted on Jan 16, 2014 4:54 PM

Reply
Question marked as Top-ranking reply

Posted on Jan 16, 2014 5:15 PM

The correct mathematical order of operations for the equation that you posted 100-50/2 is to first divide 50/2, answer 25, then subtract 25 from 100, answer 75. Order of operations is not from left to right as in 100-50, answer 50, then divided by 2, answer 25. Order of operations is parenthesis, exponent, multiplication, division, addition, then subtraction.

13 replies
Question marked as Top-ranking reply

Jan 16, 2014 5:15 PM in response to W. Raider

The correct mathematical order of operations for the equation that you posted 100-50/2 is to first divide 50/2, answer 25, then subtract 25 from 100, answer 75. Order of operations is not from left to right as in 100-50, answer 50, then divided by 2, answer 25. Order of operations is parenthesis, exponent, multiplication, division, addition, then subtraction.

Jan 16, 2014 5:00 PM in response to W. Raider

The calculators on my Windows computer and iPhone 5S behave exactly the same. I believe this has to do with the fact that the iPhone calculator does not store the calculation and perform it all at once. As you type it in, it will do the 100-50, then divide by 2. It more than likely has to do with the design of the calculator. Not all calculators will store the entire problem and execute it all at once. Granted, this is my opinion, but I believe that as you enter the 100-50, then hit the divide sign, it calculates that first section, then you enter the 2 and equal, that is why you get the answer you get.

Jan 16, 2014 5:19 PM in response to W. Raider

100 - 50 /2 is evaluated as:


Division first: 50/2 = 25

Subtraction next: 100 - 25 = 75


Any scientific calculator will evaluate that expression as 100 - (50/2). The Mac is evaluating it as (100-50) / 2


Neither is "right" or "wrong". You just have to know whether the calculator is following mathematical evaluation rules or left-to-right evaluation rules.

iPhone Calculator Wrong Order of Operations?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.