STOCK AVERAGE CALCULATOR 2024
Stock Average Calculator var totalQuantity = quantity1 + quantity2; var totalAmount = (quantity1 * price1) + (quantity2 * price2); var averagePrice = totalAmount / totalQuantity; var resultText = “Total Quantity: ” + totalQuantity.toFixed(2) + “\nAverage Price: ₹” + averagePrice.toFixed(2) + “\nTotal Investment Amount: ₹” + totalAmount.toFixed(2); document.getElementById(‘result’).innerText = resultText; document.getElementById(‘result’).style.display = ‘block’; } function reset() … Read more