RETURN
Investment Profit
body {
font-family: Arial, sans-serif;
text-align: center;
margin-top: 50px;
}
.profit-container {
padding: 20px;
display: inline-block;
border-radius: 10px;
}
.title {
font-size: 24px;
font-weight: bold;
color: black;
}
.value {
font-size: 28px;
color: black;
font-weight: bold;
}
function calculateProfit() {
const principal = 100000; // Initial investment amount
const annualRate = 25 / 100; // 25% yearly return
const startDate = new Date('2025-01-15'); // Investment start date
const today = new Date(); // Current date
const daysElapsed = Math.floor((today - startDate) / (1000 * 60 * 60 * 24)); // Days since start
const dailyRate = annualRate / 365; // Daily interest rate
const profit = Math.floor(principal * dailyRate * daysElapsed); // Calculate profit
// Update the profit value in the HTML
document.getElementById('profitValue').innerText = `₹${profit}`;
}
// Call the function to display profit
calculateProfit();
// Refresh the profit daily at midnight
setInterval(calculateProfit, 86400000); // 24 hours