PrecisionCalc
xl
Precision
Get Your Numbers Right

 

xlpREDUCEFRACTION

Reduces a fraction to the smallest possible numerator and denominator by finding the largest divisor of both numbers, with up to 32,767 significant digits of precision.

By default, returns a string formatted as <numerator>/<denominator>. Can also return numerator only, or denominator only, or the divisor by which the fraction was reduced. Or, can return an array with all four return values in an array of four cells.

To return all four values in an array of four cells, the formula must be array-entered. To array-enter an xlpREDUCEFRACTION formula, follow these steps:

  1. Select the four cells in which you want the four return values. The four cells must be either four horizontally adjacent cells (such as A1:D1), or four vertically adjacent cells (such as A1:A4).
  2. With the four cells selected, type the formula in the first (top or left) of the selected cells.
  3. With the four cells still selected, press and hold down the CTRL and SHIFT keys.
  4. With the four cells still selected, and with the CTRL and SHIFT keys still held down, press Enter.
  5. You should see the formatted reduced formula (<numerator>/<denominator>) in the first cell, the reduced numerator in the second cell, the reduced denominator in the third cell, and the divisor used to reduce the fraction in the fourth cell.

Syntax

xlpREDUCEFRACTION(numerator,denominator,simplify_signs,always_simplify_fraction,return_numerator,return_denominator,return_reduced_by,fraction_separator)

numerator Required. The numerator of the fraction to be reduced.
denominator Required. The denominator of the fraction to be reduced.
simplify_signs Optional. Set to TRUE to simplify the positive and negative signs of the numerator and denominator. If both were negative, turns both positive. If denominator was negative and numerator was positive, turns denominator positive and numerator negative. If either numerator or denominator is 0, turns all signs positive. False by default.
always_simplify_fraction Optional. Set to TRUE to simplify the fraction by multiplying by factors of 10 until both numerator and denominator are integers. The simplified fraction is then reduced as much as possible, but the result may not be a reduction relative to the original fraction. False by default.
return_numerator Optional. Set to TRUE to return only the numerator of the reduced fraction. Omit or set to FALSE if array-entering formula to return all four values in an array of four cells.
return_denominator Optional. Set to TRUE to return only the denominator of the reduced fraction. Ignored if return_numerator is true. Omit or set to FALSE if array-entering formula to return all four values in an array of four cells.
return_reduced_by Optional. Set to TRUE to return only the divisor used to reduce the fraction. Ignored if return_numerator or return_denominator is true. Omit or set to FALSE if array-entering formula to return all four values in an array of four cells. return_divisor is true.
fraction_separator Optional. Sets the character or string of characters to be used to separate the numerator and denominator. Slash ("/") by default.

Remarks

Examples

Formula Description Result
=xlpREDUCEFRACTION(5,10) Reduce 5/10 1/2
=xlpREDUCEFRACTION(221,-793) Reduce 221/(-793) 17/-61
=xlpREDUCEFRACTION(221,-793,TRUE) Reduce 221/(-793), and simplify signs -17/61
=xlpREDUCEFRACTION(0,-3,TRUE) Reduce 0/(-3), and simplify signs 0/3
=xlpREDUCEFRACTION(2.5,10) Reduce 2.5/10 1/4
=xlpREDUCEFRACTION(2.6,10) Reduce 2.6/10 2.6/10
=xlpREDUCEFRACTION(2.6,10,,TRUE) Reduce 2.6/10, and simplify (even if reduced simplification is not a reduction of the original) 13/50
=xlpREDUCEFRACTION(98,266,,,TRUE) Reduce 98/266, and return reduced numerator 7
=xlpREDUCEFRACTION(98,266,,,,TRUE) Reduce 98/266, and return reduced denominator 19
=xlpREDUCEFRACTION(98,266,,,,,TRUE) Reduce 98/266, and return the divisor by which the fraction was reduced 14
=xlpREDUCEFRACTION(5,10,,,,,," / ") Reduce 5/10, and separate the numerator and denominator by the string " / " (space, slash, space) 1 / 2