function fabricCalculator(length, width, fabricWidth, seamAllowance) {
// Add seam allowance to the length and width
length += seamAllowance * 2;
width += seamAllowance * 2;
// Calculate the area of the item with seam allowance
let itemArea = length * width;
// Calculate the number of yards needed
let yardsNeeded = itemArea / fabricWidth;
// Convert square inches to yards (1 yard = 36 inches)
yardsNeeded = yardsNeeded / 36;
return yardsNeeded.toFixed(2);
}