How can I calculate a ratio?

I'm trying to calculate a ratio in Numbers. I looked for forumlae and was brought to ones from excel but when I put these into Numbers the result is not what I expected.


I used the following formula.

=B2/GCD(B2,C2) & ":" & C2/GCD(B2,C2)


But the answer just showed me the number from B and number from C with a colon in between


Ratio of 34,482,779 and 12,500 became 34,482,779 : 12,500 instead of 10,000 : 4.


Solution?


iMac, Mac OS X (10.4.8)

Posted on Dec 12, 2012 5:16 PM

Reply
20 replies

Dec 12, 2012 7:15 PM in response to donbiki

As Wayne said, the formula is correct and gives correct results


GCD is "greatest common denominator". GCD is finding the greatest common denominator of the two numbers. The formula divides both numbers by the GCD and places a colon between them to make the ratio. You would have a hard time figuring out the greatest common denominator using division instead of the GCD function. The pairs of numbers in your post don't have a common denominator (or, more technically, the common denominator =1) so it is parroting back the same numbers.


For the number 34,482,779 to give you the ratio 10,000:4, the other number wouldn't be 12,500 it would be 13,793.1116 which won't work because it has numbers after the decimal. Also, 10,000:4 itself has a common denominator so you'll never see that as a result, it would be 2,500:1

Dec 21, 2012 3:43 PM in response to Baladon

Baladon wrote:


Thank you very much Badunit.


When I put that formula it appears a little red triangule in the box.

When I click on it, it says "numbers can't be divided by zero".

How can I make this red triangule dissapear?


Thank you for your help.


The only division is B3/B2. If you are dividing by zero, B2 is zero (or empty). I have B2 = 2 in my post.

Dec 21, 2012 6:40 PM in response to Baladon

Baldon,


You should recall from school that dividing by zero results in infinitley large result which is not representatble on any computer and, as such, results in an error. You can try the test yourself if you do not understand what I mean:


perform the following operations:


1/1


1/0.5


1/0.1


1/0.001


1/0.0000001


1/0.0000000000000001


1/0.000000000000000000000000001


as the denomenator gets smaller the result of the division gets larger.


Numbers flags this as an error if you actually attempt:


1/0


as this will cause a much more serious Divide by 0 exception on the processor itself.

Dec 21, 2012 7:00 PM in response to Wayne Contello

Hi "Mr Contello",


I work with numbers (and I don't mean the Apple's App).


I could talk to you about "maths" for hours if you want.

SO yes "I recall from school that any number divide by zero results in infinitley".

But what I was asking if wasn't a math lesson from you.....

What I was asking was when the box B2= nothing, whats it is the formula in "Numbers" to rid of the red triangle in the box B4.


That was all.... thank you anyway.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How can I calculate a ratio?

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