Easily multiply two fractions. Enter the numerators and denominators for each fraction.
Result:
—
How to Multiply Fractions
Multiplying fractions is a fundamental arithmetic operation. To multiply two fractions, you simply multiply the numerators (the top numbers) together to get the new numerator, and then multiply the denominators (the bottom numbers) together to get the new denominator.
The general formula for multiplying two fractions, say a/b and c/d, is:
(a / b) * (c / d) = (a * c) / (b * d)
Steps:
Identify the Numerators: Take the top number from each fraction.
Multiply the Numerators: Calculate the product of these two numbers. This will be the numerator of your resulting fraction.
Identify the Denominators: Take the bottom number from each fraction.
Multiply the Denominators: Calculate the product of these two numbers. This will be the denominator of your resulting fraction.
Form the Result: The new fraction is formed by the product of the numerators over the product of the denominators.
Simplify (Optional but Recommended): Reduce the resulting fraction to its simplest form by dividing both the numerator and the denominator by their greatest common divisor (GCD). This calculator automatically provides the simplified answer.
Example:
Let's multiply 3/4 by 2/5.
Numerator 1 = 3, Denominator 1 = 4
Numerator 2 = 2, Denominator 2 = 5
Multiply numerators: 3 * 2 = 6
Multiply denominators: 4 * 5 = 20
The resulting fraction is 6/20.
Simplify 6/20 by dividing both by their GCD, which is 2: 6 ÷ 2 = 3 and 20 ÷ 2 = 10.
The simplified result is 3/10.
Use Cases:
Multiplying fractions is essential in various fields:
Cooking and Baking: Scaling recipes up or down requires multiplying ingredient quantities (often expressed as fractions).
Geometry: Calculating areas or proportions involving fractional dimensions.
Proportions and Ratios: Understanding how quantities relate when parts of parts are considered.
General Mathematics: A foundational skill for more complex algebraic and calculus problems.
This calculator helps ensure accuracy and speed when performing fraction multiplication.
// Function to calculate the Greatest Common Divisor (GCD) using Euclidean algorithm
function gcd(a, b) {
var a = Math.abs(a);
var b = Math.abs(b);
while (b) {
var t = b;
b = a % b;
a = t;
}
return a;
}
// Function to multiply fractions and display the result
function multiplyFractions() {
var num1 = document.getElementById("numerator1").value;
var den1 = document.getElementById("denominator1").value;
var num2 = document.getElementById("numerator2").value;
var den2 = document.getElementById("denominator2").value;
var resultValueElement = document.getElementById("result-value");
var resultFractionDisplayElement = document.getElementById("result-fraction-display");
// Clear previous results and styling
resultValueElement.textContent = "–";
resultFractionDisplayElement.textContent = "";
resultValueElement.style.color = "#28a745"; // Reset to success green
// Input validation
if (num1 === "" || den1 === "" || num2 === "" || den2 === "") {
resultValueElement.textContent = "Error";
resultValueElement.style.color = "red";
resultFractionDisplayElement.textContent = "Please fill in all fields.";
return;
}
var numerator1 = parseFloat(num1);
var denominator1 = parseFloat(den1);
var numerator2 = parseFloat(num2);
var denominator2 = parseFloat(den2);
if (isNaN(numerator1) || isNaN(denominator1) || isNaN(numerator2) || isNaN(denominator2)) {
resultValueElement.textContent = "Error";
resultValueElement.style.color = "red";
resultFractionDisplayElement.textContent = "Please enter valid numbers.";
return;
}
if (denominator1 === 0 || denominator2 === 0) {
resultValueElement.textContent = "Error";
resultValueElement.style.color = "red";
resultFractionDisplayElement.textContent = "Denominators cannot be zero.";
return;
}
// Perform multiplication
var resultNumerator = numerator1 * numerator2;
var resultDenominator = denominator1 * denominator2;
// Simplify the fraction
var commonDivisor = gcd(resultNumerator, resultDenominator);
var simplifiedNumerator = resultNumerator / commonDivisor;
var simplifiedDenominator = resultDenominator / commonDivisor;
// Display the result
resultValueElement.textContent = simplifiedNumerator;
resultFractionDisplayElement.innerHTML = ` / ${simplifiedDenominator}`;
}