Fraction Calculator Adding and Subtracting

Fraction Calculator: Adding and Subtracting Fractions :root { –primary-color: #004a99; –success-color: #28a745; –background-color: #f8f9fa; –text-color: #333; –border-color: #ddd; –shadow-color: rgba(0, 0, 0, 0.1); } body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background-color: var(–background-color); color: var(–text-color); line-height: 1.6; margin: 0; padding: 0; } .container { max-width: 960px; margin: 20px auto; padding: 20px; background-color: #fff; border-radius: 8px; box-shadow: 0 4px 15px var(–shadow-color); } header { background-color: var(–primary-color); color: #fff; padding: 20px 0; text-align: center; border-radius: 8px 8px 0 0; margin-bottom: 20px; } header h1 { margin: 0; font-size: 2.2em; } h2, h3 { color: var(–primary-color); margin-top: 1.5em; margin-bottom: 0.5em; } .calculator-section { margin-bottom: 30px; padding: 20px; border: 1px solid var(–border-color); border-radius: 6px; background-color: #fdfdfd; } .calculator-section h2 { text-align: center; margin-top: 0; } .input-group { margin-bottom: 15px; display: flex; flex-direction: column; align-items: flex-start; } .input-group label { display: block; margin-bottom: 8px; font-weight: bold; color: var(–primary-color); } .input-group input[type="number"], .input-group input[type="text"] { width: calc(100% – 20px); padding: 10px; border: 1px solid var(–border-color); border-radius: 4px; font-size: 1em; box-sizing: border-box; } .input-group input[type="number"]:focus, .input-group input[type="text"]:focus { outline: none; border-color: var(–primary-color); box-shadow: 0 0 0 2px rgba(0, 74, 153, 0.2); } .input-group .helper-text { font-size: 0.85em; color: #666; margin-top: 5px; } .error-message { color: #dc3545; font-size: 0.85em; margin-top: 5px; display: none; /* Hidden by default */ } .button-group { display: flex; justify-content: space-between; margin-top: 20px; flex-wrap: wrap; gap: 10px; } button { padding: 10px 20px; border: none; border-radius: 5px; cursor: pointer; font-size: 1em; font-weight: bold; transition: background-color 0.3s ease; } .btn-primary { background-color: var(–primary-color); color: white; } .btn-primary:hover { background-color: #003366; } .btn-success { background-color: var(–success-color); color: white; } .btn-success:hover { background-color: #218838; } .btn-secondary { background-color: #6c757d; color: white; } .btn-secondary:hover { background-color: #5a6268; } #results { margin-top: 25px; padding: 20px; border: 1px solid var(–border-color); border-radius: 6px; background-color: #eef7ff; text-align: center; } #results h3 { margin-top: 0; color: var(–primary-color); } .result-item { margin-bottom: 10px; font-size: 1.1em; } .result-label { font-weight: bold; color: var(–primary-color); } .main-result { font-size: 1.8em; font-weight: bold; color: var(–success-color); background-color: #d4edda; padding: 15px; border-radius: 5px; margin-top: 15px; display: inline-block; min-width: 50%; } .formula-explanation { font-size: 0.9em; color: #555; margin-top: 15px; font-style: italic; } table { width: 100%; border-collapse: collapse; margin-top: 20px; box-shadow: 0 2px 5px var(–shadow-color); } th, td { padding: 12px 15px; text-align: left; border: 1px solid var(–border-color); } thead { background-color: var(–primary-color); color: white; } tbody tr:nth-child(even) { background-color: #f2f2f2; } caption { font-size: 1.1em; font-weight: bold; color: var(–primary-color); margin-bottom: 10px; caption-side: top; text-align: left; } canvas { display: block; margin: 20px auto; border: 1px solid var(–border-color); border-radius: 4px; background-color: #fff; } .chart-legend { text-align: center; margin-top: 10px; font-size: 0.9em; color: #555; } .chart-legend span { display: inline-block; margin: 0 10px; } .chart-legend .color-box { display: inline-block; width: 12px; height: 12px; margin-right: 5px; vertical-align: middle; border-radius: 3px; } .article-content { margin-top: 30px; padding: 20px; background-color: #fff; border-radius: 8px; box-shadow: 0 4px 15px var(–shadow-color); } .article-content h2 { border-bottom: 2px solid var(–primary-color); padding-bottom: 5px; margin-bottom: 1em; } .article-content h3 { margin-top: 1.5em; color: #0056b3; } .article-content p { margin-bottom: 1em; } .article-content ul, .article-content ol { margin-left: 20px; margin-bottom: 1em; } .article-content li { margin-bottom: 0.5em; } .article-content strong { color: var(–primary-color); } .internal-links { margin-top: 30px; padding: 20px; background-color: #fff; border-radius: 8px; box-shadow: 0 4px 15px var(–shadow-color); } .internal-links h2 { border-bottom: 2px solid var(–primary-color); padding-bottom: 5px; margin-bottom: 1em; } .internal-links ul { list-style: none; padding: 0; } .internal-links li { margin-bottom: 15px; } .internal-links a { color: var(–primary-color); text-decoration: none; font-weight: bold; } .internal-links a:hover { text-decoration: underline; } .internal-links p { font-size: 0.9em; color: #555; margin-top: 5px; } .variable-table th, .variable-table td { text-align: center; } .variable-table th { background-color: #e9ecef; } .variable-table td { background-color: #f8f9fa; } .variable-table tr:nth-child(even) { background-color: #f2f2f2; } .variable-table { margin-bottom: 1.5em; } .variable-table caption { font-weight: bold; color: var(–primary-color); margin-bottom: 10px; caption-side: top; text-align: left; } @media (min-width: 768px) { .input-group { flex-direction: row; align-items: center; gap: 15px; } .input-group label { margin-bottom: 0; width: 150px; /* Fixed width for labels */ text-align: right; } .input-group input[type="number"], .input-group input[type="text"] { width: 100px; /* Fixed width for inputs */ } .button-group { justify-content: flex-start; gap: 15px; } button { min-width: 150px; } }

Fraction Calculator: Adding and Subtracting

Fraction Addition & Subtraction

Enter two fractions to add or subtract them. Use whole numbers for numerators and denominators.

+ –

Results

Operation:
Fraction 1:
Fraction 2:
Common Denominator:
Adjusted Numerators:
Result: —
To add or subtract fractions, find a common denominator, adjust the numerators accordingly, and then perform the operation on the numerators.

Visual Representation

Fraction 1 Fraction 2 Result

Calculation Steps

Fraction Addition/Subtraction Steps
Step Description Value
1 Fraction 1
2 Fraction 2
3 Common Denominator
4 Adjusted Numerator 1
5 Adjusted Numerator 2
6 Final Numerator
7 Final Result

Understanding Fraction Addition and Subtraction

What is Fraction Addition and Subtraction?

Fraction addition and subtraction are fundamental arithmetic operations involving fractions. A fraction represents a part of a whole, typically written as a numerator (the top number) over a denominator (the bottom number). Adding or subtracting fractions means combining or finding the difference between these parts. This process is crucial in various mathematical contexts, from basic arithmetic to more complex algebra and calculus. It's also a practical skill used in everyday life, such as when measuring ingredients for a recipe, dividing tasks, or understanding proportions.

Who should use it: Students learning arithmetic, anyone needing to perform calculations with parts of a whole, professionals in fields like cooking, construction, engineering, and finance where precise measurements and proportions are key. Even for everyday tasks like sharing a pizza or calculating discounts, understanding fraction operations is beneficial.

Common misconceptions: A frequent mistake is adding or subtracting numerators and denominators directly (e.g., 1/2 + 1/3 = 2/5). This is incorrect because the "size" of the parts (represented by the denominators) must be the same before you can combine or compare them. Another misconception is that fractions are only used in academic settings; in reality, they are pervasive in practical applications.

Fraction Addition & Subtraction Formula and Mathematical Explanation

The core principle behind adding and subtracting fractions is ensuring they share a common denominator. This means the "pieces" of the whole being represented by the fractions must be of the same size.

Adding Fractions:

Let's say we have two fractions: a/b and c/d.

  1. Find a Common Denominator (CD): The least common multiple (LCM) of the denominators b and d is typically used. Let this be CD.
  2. Adjust Numerators:
    • For the first fraction (a/b), multiply the numerator a by the factor needed to turn b into CD. This factor is CD / b. The new numerator is a * (CD / b).
    • For the second fraction (c/d), multiply the numerator c by the factor needed to turn d into CD. This factor is CD / d. The new numerator is c * (CD / d).
  3. Add the Adjusted Numerators: Add the new numerators together: (a * (CD / b)) + (c * (CD / d)).
  4. Form the Result: The sum is the new numerator over the common denominator: [(a * (CD / b)) + (c * (CD / d))] / CD.
  5. Simplify: Reduce the resulting fraction to its simplest form by dividing the numerator and denominator by their greatest common divisor (GCD).

Subtracting Fractions:

The process is identical to addition, except for step 3, where you subtract the second adjusted numerator from the first.

  1. Find a Common Denominator (CD): Same as above.
  2. Adjust Numerators: Same as above.
  3. Subtract the Adjusted Numerators: Subtract the second new numerator from the first: (a * (CD / b)) - (c * (CD / d)).
  4. Form the Result: The difference is the new numerator over the common denominator: [(a * (CD / b)) - (c * (CD / d))] / CD.
  5. Simplify: Reduce the resulting fraction to its simplest form.

Variables Table:

Variables Used in Fraction Operations
Variable Meaning Unit Typical Range
a, c Numerators of the fractions Count Integers (positive, negative, or zero)
b, d Denominators of the fractions Count Non-zero Integers (typically positive)
CD Common Denominator (LCM of b and d) Count Positive Integer
GCD Greatest Common Divisor Count Positive Integer
Result The sum or difference of the fractions Ratio Any rational number

Practical Examples (Real-World Use Cases)

Example 1: Baking – Adding Ingredients

A recipe calls for 1/2 cup of flour and 1/3 cup of sugar. How much total volume do these ingredients take up?

  • Fraction 1: 1/2 (flour)
  • Fraction 2: 1/3 (sugar)
  • Operation: Addition

Calculation:

  1. Common Denominator (LCM of 2 and 3) is 6.
  2. Adjusted Numerators:
    • For 1/2: 1 * (6 / 2) = 1 * 3 = 3. Fraction becomes 3/6.
    • For 1/3: 1 * (6 / 3) = 1 * 2 = 2. Fraction becomes 2/6.
  3. Add adjusted numerators: 3 + 2 = 5.
  4. Result: 5/6 cup.

Interpretation: You need a total of 5/6 of a cup to measure out both the flour and sugar.

Example 2: Carpentry – Subtracting Lengths

You have a piece of wood that is 3/4 of a meter long. You need to cut off a piece that is 1/8 of a meter long for a project. How much wood will be left?

  • Fraction 1: 3/4 (initial length)
  • Fraction 2: 1/8 (length to cut)
  • Operation: Subtraction

Calculation:

  1. Common Denominator (LCM of 4 and 8) is 8.
  2. Adjusted Numerators:
    • For 3/4: 3 * (8 / 4) = 3 * 2 = 6. Fraction becomes 6/8.
    • For 1/8: Denominator is already 8. Numerator is 1. Fraction remains 1/8.
  3. Subtract adjusted numerators: 6 - 1 = 5.
  4. Result: 5/8 meter.

Interpretation: After cutting the piece, you will have 5/8 of a meter of wood remaining.

How to Use This Fraction Calculator

Our Fraction Calculator is designed for simplicity and accuracy. Follow these steps to perform fraction addition or subtraction:

  1. Enter Fraction 1: Input the numerator and denominator for your first fraction in the respective fields.
  2. Select Operation: Choose either '+' (Add) or '-' (Subtract) from the dropdown menu.
  3. Enter Fraction 2: Input the numerator and denominator for your second fraction.
  4. Calculate: Click the "Calculate" button.

How to read results:

  • The calculator will display the operation performed, the original fractions, the common denominator found, the adjusted numerators, and the final simplified result.
  • The "Main Result" box shows the final answer in its simplest form.
  • The table provides a step-by-step breakdown of the calculation process.
  • The chart offers a visual comparison of the fractions and the result.

Decision-making guidance: Use this calculator to quickly verify your manual calculations, solve homework problems, or understand how combining fractional quantities affects the total. For instance, if you're adjusting a recipe, you can use it to determine the new total amount of an ingredient.

Key Factors That Affect Fraction Calculation Results

While the mathematical process for adding and subtracting fractions is standardized, several factors influence the interpretation and application of the results:

  1. Common Denominator Choice: While the Least Common Multiple (LCM) provides the simplest result directly, using any common multiple will yield a correct answer, though it might require further simplification. For example, using 12 instead of 6 as a common denominator for 1/2 and 1/3 would result in 6/12 + 4/12 = 10/12, which simplifies to 5/6.
  2. Simplification (GCD): Failing to simplify the final fraction means the answer isn't in its most concise form. Always find the Greatest Common Divisor (GCD) of the final numerator and denominator to reduce the fraction.
  3. Negative Numbers: If numerators or denominators involve negative signs, careful attention must be paid to the rules of signed number arithmetic during addition and subtraction. The position of the negative sign (numerator, denominator, or in front of the fraction) can be standardized.
  4. Improper Fractions vs. Mixed Numbers: The calculator typically outputs improper fractions (numerator larger than or equal to the denominator). Depending on the context, you might need to convert this to a mixed number (e.g., 7/4 becomes 1 3/4).
  5. Context of the Problem: The meaning of the result depends entirely on what the fractions represent. Are they parts of a whole object, measurements of distance, portions of time, or probabilities? Understanding the context is vital for interpreting the calculated sum or difference correctly.
  6. Precision Requirements: For most practical purposes, simplified fractions are sufficient. However, in some scientific or engineering contexts, decimal approximations might be preferred, requiring conversion from the fractional result.

Frequently Asked Questions (FAQ)

Q1: Can I add or subtract fractions with different denominators directly?
No, you must first find a common denominator for both fractions before adding or subtracting their numerators.
Q2: What is the easiest way to find a common denominator?
The easiest way is to find the Least Common Multiple (LCM) of the two denominators. Multiplying the denominators together also works, but it might result in a larger number that requires more simplification later.
Q3: How do I handle negative fractions?
Treat negative signs according to the rules of integer addition and subtraction. For example, -1/2 + 1/4 becomes -2/4 + 1/4 = -1/4. You can also move the negative sign to the numerator or in front of the fraction for consistency.
Q4: What if the result is an improper fraction?
An improper fraction (like 5/3) can often be converted into a mixed number (1 2/3) by dividing the numerator by the denominator. The quotient is the whole number part, and the remainder becomes the new numerator over the original denominator.
Q5: Does the order matter for subtraction?
Yes, subtraction is not commutative. a/b - c/d is generally not the same as c/d - a/b. Always subtract the second fraction from the first as indicated.
Q6: Can this calculator handle fractions with zero in the numerator?
Yes, a fraction with a zero numerator (e.g., 0/5) is equal to zero. The calculator will handle this correctly in addition and subtraction.
Q7: What happens if I enter zero in a denominator?
Division by zero is undefined in mathematics. This calculator will display an error message, and you will need to enter a non-zero value for the denominator.
Q8: How does this relate to finding a common denominator for more than two fractions?
The principle remains the same. You find the LCM of all denominators involved. The process is extended iteratively or by finding the LCM of all denominators simultaneously.
© 2023 Your Financial Tools. All rights reserved.
var canvas = document.getElementById('fractionChart'); var ctx = canvas.getContext('2d'); var chart = null; function gcd(a, b) { a = Math.abs(a); b = Math.abs(b); while (b) { var t = b; b = a % b; a = t; } return a; } function lcm(a, b) { if (a === 0 || b === 0) return 0; return Math.abs(a * b) / gcd(a, b); } function simplifyFraction(numerator, denominator) { if (denominator === 0) { return { numerator: NaN, denominator: NaN, error: "Denominator cannot be zero." }; } if (numerator === 0) { return { numerator: 0, denominator: 1, error: null }; } var commonDivisor = gcd(numerator, denominator); var num = numerator / commonDivisor; var den = denominator / commonDivisor; if (den < 0) { num = -num; den = -den; } return { numerator: num, denominator: den, error: null }; } function updateChart(frac1Num, frac1Den, frac2Num, frac2Den, resultNum, resultDen) { if (chart) { chart.destroy(); } var data = { labels: ['Fraction 1', 'Fraction 2', 'Result'], datasets: [{ label: 'Value', data: [], backgroundColor: ['#004a99', '#28a745', '#ffc107'], borderColor: ['#004a99', '#28a745', '#ffc107'], borderWidth: 1 }] }; var maxVal = 1; if (frac1Den !== 0 && !isNaN(frac1Num) && !isNaN(frac1Den)) { data.datasets[0].data.push(frac1Num / frac1Den); maxVal = Math.max(maxVal, Math.abs(frac1Num / frac1Den)); } else { data.datasets[0].data.push(0); } if (frac2Den !== 0 && !isNaN(frac2Num) && !isNaN(frac2Den)) { data.datasets[0].data.push(frac2Num / frac2Den); maxVal = Math.max(maxVal, Math.abs(frac2Num / frac2Den)); } else { data.datasets[0].data.push(0); } if (resultDen !== 0 && !isNaN(resultNum) && !isNaN(resultDen)) { data.datasets[0].data.push(resultNum / resultDen); maxVal = Math.max(maxVal, Math.abs(resultNum / resultDen)); } else { data.datasets[0].data.push(0); } // Ensure maxVal is at least 1 for better visualization maxVal = Math.max(maxVal, 1); chart = new Chart(ctx, { type: 'bar', data: data, options: { responsive: true, maintainAspectRatio: false, scales: { y: { beginAtZero: true, max: maxVal * 1.2, // Add some padding at the top title: { display: true, text: 'Value' } } }, plugins: { legend: { display: false // Use custom legend }, title: { display: true, text: 'Fraction Values Comparison' } } } }); } function calculateFractions() { var num1 = parseInt(document.getElementById('numerator1').value); var den1 = parseInt(document.getElementById('denominator1').value); var num2 = parseInt(document.getElementById('numerator2').value); var den2 = parseInt(document.getElementById('denominator2').value); var operation = document.getElementById('operation').value; var errors = false; // Clear previous errors var errorElements = document.querySelectorAll('.error-message'); for (var i = 0; i < errorElements.length; i++) { errorElements[i].style.display = 'none'; errorElements[i].textContent = ''; } // Validate inputs if (isNaN(num1) || isNaN(den1) || isNaN(num2) || isNaN(den2)) { if (isNaN(num1)) document.getElementById('errorNumerator1').textContent = 'Please enter a valid number.'; if (isNaN(den1)) document.getElementById('errorDenominator1').textContent = 'Please enter a valid number.'; if (isNaN(num2)) document.getElementById('errorNumerator2').textContent = 'Please enter a valid number.'; if (isNaN(den2)) document.getElementById('errorDenominator2').textContent = 'Please enter a valid number.'; errors = true; } if (den1 === 0) { document.getElementById('errorDenominator1').textContent = 'Denominator cannot be zero.'; errors = true; } if (den2 === 0) { document.getElementById('errorDenominator2').textContent = 'Denominator cannot be zero.'; errors = true; } if (errors) { document.getElementById('mainResult').textContent = 'Result: Error'; return; } var commonDen = lcm(den1, den2); var adjNum1 = num1 * (commonDen / den1); var adjNum2 = num2 * (commonDen / den2); var finalNum, finalDen; if (operation === 'add') { finalNum = adjNum1 + adjNum2; } else { // subtract finalNum = adjNum1 – adjNum2; } finalDen = commonDen; var simplified = simplifyFraction(finalNum, finalDen); if (simplified.error) { document.getElementById('mainResult').textContent = 'Result: Error'; // Handle specific error display if needed return; } var resultFractionStr = simplified.numerator + "/" + simplified.denominator; var frac1Str = num1 + "/" + den1; var frac2Str = num2 + "/" + den2; document.getElementById('resultOperation').textContent = operation === 'add' ? '+' : '-'; document.getElementById('resultFraction1').textContent = frac1Str; document.getElementById('resultFraction2').textContent = frac2Str; document.getElementById('resultCommonDenominator').textContent = commonDen; document.getElementById('resultAdjustedNumerators').textContent = adjNum1 + ", " + adjNum2; document.getElementById('mainResult').textContent = "Result: " + resultFractionStr; // Update table document.getElementById('tableFraction1').textContent = frac1Str; document.getElementById('tableFraction2').textContent = frac2Str; document.getElementById('tableCommonDenominator').textContent = commonDen; document.getElementById('tableAdjustedNumerator1').textContent = adjNum1; document.getElementById('tableAdjustedNumerator2').textContent = adjNum2; document.getElementById('tableFinalNumerator').textContent = simplified.numerator; document.getElementById('tableFinalResult').textContent = resultFractionStr; // Update chart updateChart(num1, den1, num2, den2, simplified.numerator, simplified.denominator); } function resetForm() { document.getElementById('numerator1').value = '1'; document.getElementById('denominator1').value = '2'; document.getElementById('operation').value = 'add'; document.getElementById('numerator2').value = '1'; document.getElementById('denominator2').value = '3'; // Clear results and errors document.getElementById('resultOperation').textContent = '–'; document.getElementById('resultFraction1').textContent = '–'; document.getElementById('resultFraction2').textContent = '–'; document.getElementById('resultCommonDenominator').textContent = '–'; document.getElementById('resultAdjustedNumerators').textContent = '–'; document.getElementById('mainResult').textContent = 'Result: –'; var errorElements = document.querySelectorAll('.error-message'); for (var i = 0; i < errorElements.length; i++) { errorElements[i].style.display = 'none'; errorElements[i].textContent = ''; } // Reset table document.getElementById('tableFraction1').textContent = '–'; document.getElementById('tableFraction2').textContent = '–'; document.getElementById('tableCommonDenominator').textContent = '–'; document.getElementById('tableAdjustedNumerator1').textContent = '–'; document.getElementById('tableAdjustedNumerator2').textContent = '–'; document.getElementById('tableFinalNumerator').textContent = '–'; document.getElementById('tableFinalResult').textContent = '–'; // Reset chart if (chart) { chart.destroy(); chart = null; } // Optionally redraw with default state or clear canvas ctx.clearRect(0, 0, canvas.width, canvas.height); } function copyResults() { var operation = document.getElementById('resultOperation').textContent; var frac1 = document.getElementById('resultFraction1').textContent; var frac2 = document.getElementById('resultFraction2').textContent; var commonDen = document.getElementById('resultCommonDenominator').textContent; var adjNums = document.getElementById('resultAdjustedNumerators').textContent; var mainResult = document.getElementById('mainResult').textContent; var textToCopy = "Fraction Calculation Results:\n"; textToCopy += "Operation: " + operation + "\n"; textToCopy += "Fraction 1: " + frac1 + "\n"; textToCopy += "Fraction 2: " + frac2 + "\n"; textToCopy += "Common Denominator: " + commonDen + "\n"; textToCopy += "Adjusted Numerators: " + adjNums + "\n"; textToCopy += mainResult + "\n\n"; textToCopy += "Key Assumptions:\n"; textToCopy += "- Denominators must be non-zero.\n"; textToCopy += "- Result is simplified to its lowest terms."; var textArea = document.createElement("textarea"); textArea.value = textToCopy; textArea.style.position = "fixed"; textArea.style.left = "-9999px"; document.body.appendChild(textArea); textArea.focus(); textArea.select(); try { var successful = document.execCommand('copy'); var msg = successful ? 'Results copied!' : 'Copying failed!'; console.log(msg); // Optionally show a temporary message to the user var copyButton = document.querySelector('button[onclick="copyResults()"]'); var originalText = copyButton.textContent; copyButton.textContent = msg; setTimeout(function() { copyButton.textContent = originalText; }, 2000); } catch (err) { console.error('Fallback: Oops, unable to copy', err); } document.body.removeChild(textArea); } // Initial calculation on load document.addEventListener('DOMContentLoaded', function() { calculateFractions(); // Ensure canvas is sized correctly on load canvas.width = canvas.offsetWidth; canvas.height = 300; // Set a fixed height or calculate based on container }); // Re-calculate on window resize to adjust canvas width window.addEventListener('resize', function() { canvas.width = canvas.offsetWidth; // Re-render chart if it exists if (chart) { var num1 = parseInt(document.getElementById('numerator1').value); var den1 = parseInt(document.getElementById('denominator1').value); var num2 = parseInt(document.getElementById('numerator2').value); var den2 = parseInt(document.getElementById('denominator2').value); var operation = document.getElementById('operation').value; var commonDen = lcm(den1, den2); var adjNum1 = num1 * (commonDen / den1); var adjNum2 = num2 * (commonDen / den2); var finalNum, finalDen; if (operation === 'add') { finalNum = adjNum1 + adjNum2; } else { // subtract finalNum = adjNum1 – adjNum2; } finalDen = commonDen; var simplified = simplifyFraction(finalNum, finalDen); updateChart(num1, den1, num2, den2, simplified.numerator, simplified.denominator); } });

Leave a Comment