Adding fractions calculator

Find what the result of adding two fractions is. The form has two input fields where you can enter the fractions. The fractions are entered in the format numerator/denominator, for example 3/4. When you user click the "Add Fractions" button the calculator adds the values together.



How to add fractions

Adding fractions is a mathematical operation that combines two or more fractions into a single fraction. The process of adding fractions involves finding a common denominator between the fractions and then adding the numerators of the fractions. Here are the steps to add two fractions:

  1. Find a common denominator between the two fractions. The common denominator is the least common multiple (LCM) of the denominators of the fractions.
  2. Multiply the numerator of the first fraction by the denominator of the second fraction, and multiply the numerator of the second fraction by the denominator of the first fraction.
  3. Add the two products obtained in step 2. This is the numerator of the resulting fraction.
  4. The denominator of the resulting fraction is the common denominator found in step 1. Write the resulting fraction as numerator/denominator.

For example, if we want to add the fractions 3/4 and 5/6, we first find a common denominator, which is 12 (the LCM of 4 and 6). Next, we multiply 3 by 6, and 5 by 4. We get 18 and 20 as the product respectively. Then we add these two products to get 38. So the result of 3/4 + 5/6 is 38/12.

You can also use the above method to add multiple fractions by adding them one by one.

If the fractions have the same denominator, you can directly add the numerators and the denominator remains the same.

How to simplify fractions

After adding the fractions and finding the numerator and denominator of the resulting fraction, the next step is to simplify the fraction if it's not already in its simplest form.

One way to simplify a fraction is to divide both the numerator and denominator by their greatest common divisor (GCD). The GCD is the largest number that divides both the numerator and denominator exactly.

For example, if the resulting fraction is 38/12, the GCD is 2. Dividing both numerator and denominator by 2 gives us 19/6 which is the simplified fraction

The GCD can be found using Euclidean Algorithm which is repeatedly applying the modulo operator until the remainder is zero.

You can also use built-in javascript math function like math.gcd(a,b) to find the GCD of two numbers

After finding the GCD, you can divide the numerator and denominator by GCD to get the simplest fraction.

Tinal fraction may not be in the mixed number format, if you want it to be in mixed number format you can use floor to convert it to mixed number format.