<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Monthly Profile Calculator</title> </head> <body> <label for="totalInput">Total Input Value:</label> <input type="number" id="totalInput" placeholder="Enter total input value"> <button onclick="calculateMonthlyProfile()">Calculate Monthly Profile</button> <p id="result"></p> <script> function calculateMonthlyProfile() { const totalInputValue = parseFloat(document.getElementById('totalInput').value); if (isNaN(totalInputValue)) { alert("Please enter a valid number for the total input value."); return; } const profileBefore30Percent = totalInputValue * 0.18; const remainingAmount = profileBefore30Percent - (profileBefore30Percent * 0.3); const monthlyProfile = remainingAmount / 12; document.getElementById('result').innerHTML = `Monthly Profile: $${monthlyProfile.toFixed(2)}`; } </script> </body> </html>
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter