Calculate A Ratio From Two Numbers In Excel

In elementary mathematics, a ratio is a connection or comparison between two or more integers. For example, ratios are often expressed as “:” to demonstrate the relationship between two numbers.

You would think that manually calculating a ratio from two numbers is simple, and in some ways, it is, but when you come into a task that requires you to compute the ratio of the values in two columns, it becomes difficult to do it manually.

But don’t worry about it because after carefully reading this article, you can easily calculate the ratio of the two numbers. There are other methods for calculating the ratio between two integers; however, using the GCD function is the most efficient.

So, without further ado, let’s get started.

6 Calculate a ratio from two numbers1

General Formula

In Ms Excel, use the formulae to compute the value of a bond on the issuance date.


Explanation Of Syntax

You must be aware of the Formula’s syntax to use it to complete your task.

  • GCD: The GCD Function computes the greatest common denominator of two or more numbers. We can then utilize GCD to calculate our ratios. The GCD Function is quite simple to use. Enter =GCD (followed by the integers you want to determine the greatest common divisor of) into the calculator (separated by commas).
  • The comma symbol (,): this symbol acts as a separator that aids in the separation of a list of values.
  • Parenthesis (): This symbol’s primary function is to group the elements.
  • Division (/): This symbol divides values or integers.


You may use division, the GCD function, and concatenation to get the ratio of two integers (e.g., 7:3, 11:9, etc.). The first number (the antecedent) is represented by num1 in the general version of the Formula (above), while the second number is represented by num2 (the consequent).

The active cell in the example has the following formula:


6 Calculate a ratio from two numbers1

It should be noted that the GCD function only works with integers.


This Formula appears hard, but it is pretty simple because it is composed of two parts:

= (number1 formula) &":"& (formula for number2)

The GCD function is used on the left to determine the greatest common divisor (GCD) of the two integers. The first number is then divided by the GCD. The identical processes are carried out with the second number on the right.

The results of the right and left procedures are then concatenated, with the colon (“:”) acting as a separator.


6 Calculate a ratio from two numbers1


6 Calculate a ratio from two numbers1


6 Calculate a ratio from two numbers1

It should be noted that the end outcome of this Formula is a text value.

If you’re still confused, don’t worry since both the following second and third examples will clear everything out for you and vanish all your confusion.

To compute a ratio from two values in Ms Excel, follow the instructions below.

For example, you would need to construct a sample data set in Ms Excel.

6 Calculate a ratio from two numbers1

Data samples

After that, enter the following Formula into the formula bar to get the ratio of two integers.


6 Calculate a ratio from two numbers1

press the Enter key to obtain the result in cell D3.

Finally, press Ctrl+ D to see the results in the other columns.

6 Calculate a ratio from two numbers1

For further understanding, let’s explore the third example;

Assume that we have the following two value lists in Ms Excel:

6 Calculate a ratio from two numbers1

Assume we want to compute the ratio of Value 1 to Value 2 in each row.

In cell C2, enter the following formula:

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

The screenshot below demonstrates how to apply this Formula in practice:

6 Calculate a ratio from two numbers1

The greatest common divisor of 12 and 5 is 1, as it turns out. As a result, when we divide each number by 1, we get a ratio of 12:5.

To determine the ratio for the two numbers in each row, we copy and paste this Formula in cell C2 down to every remaining cell in column C:

6 Calculate a ratio from two numbers1


I hope you liked this tutorial on computing a ratio in Ms Excel from two data sets and that it helped you understand the entire procedure.

Related Functions

  • Excel GCD function
    The Excel  GCD function Returns the greatest common divisor of two or more integers.The syntax of the GCD function is as below:= GCD(number1, [number2], …)
Related Posts

Excel/Google Sheets: Full Row Reference

Excel or Google sheets supports both full row references and full column references. This article will talk about the usage of full row references. Full Row reference is another cell reference in Excel or Google Sheets, which is used to ...

Excel/Google Sheets: Full Column Reference

Full column reference is another cell reference in Excel or Google Sheets, which is used to reference the entire column, for example, if you want to reference the entire column A, you can use the following reference format A: A. ...

Excel/Google Sheets: Expanding Reference

An expanding reference is a reference type in Excel and Google worksheets that extends the range of a cell when a formula is copied to the cell below or to the right. In this article, we will explain how to ...

Excel/Google Sheets: Mixed Reference

In Microsoft Excel Spreadsheet or Google sheets, there is another cell reference, mixed references, where part of the reference is absolute, part of the relative. This article will describe how to use mixed references through specific examples. Mixed Reference When ...

Excel/Google Sheets: Absolute Reference

In Microsoft Excel spreadsheet or Google Sheets, the cell reference is the cell or cell area address or name in the worksheet, the cell reference contains two types of references, namely, relative references and absolute references. Absolute Reference An absolute ...