Loan Interest rate calculator code -html code with java script - Free html code for

We will try to give you a new code for every day . 
You can create your tool website and earn unlimited with google and google adsense. 
You can create your free website with the google product name as Blogger. 
You just open Blogger.com 
create your account and write or paste this code in the html view of your blogger. 

so the Code is given below you can copy and paste in your website . 

Here is a code for loan interest calculator online    




<head>

    <meta charset="UTF-8"></meta>

    <meta content="width=device-width, initial-scale=1.0" name="viewport"></meta>

    <title>Interest Rate Calculator</title>

    <style>

        body {

            font-family: Arial, sans-serif;

            background-color: #f4f4f4;

            margin: 20px 0;

            padding: 20px;

            text-align: center;

        }


        h1 {

            color: #333;

            margin-bottom: 15px;

        }


        label {

            display: block;

            font-weight: bold;

            margin-bottom: 5px;

        }


        input {

            width: calc(100% - 16px);

            padding: 8px;

            border: 1px solid #ccc;

            border-radius: 4px;

            box-sizing: border-box;

            margin-top: 8px;

        }


        input[type="submit"] {

            width: 100%;

            padding: 10px;

            background-color: #4CAF50;

            color: white;

            border: none;

            border-radius: 4px;

            cursor: pointer;

        }


        #result {

            text-align: center;

            margin-top: 15px;

            font-weight: bold;

        }

    </style>

</head>

<body>

    <h1>Interest Rate Calculator</h1>

    <form id="interestRateCalculatorForm">

        <label for="loanAmount">Loan Amount:</label>

        <input id="loanAmount" placeholder="Loan amount" required="" type="number" />


        <label for="loanTenure">Loan Tenure (months):</label>

        <input id="loanTenure" placeholder="Loan tenure" required="" type="number" />


        <label for="monthlyInstallment">Monthly Installment:</label>

        <input id="monthlyInstallment" placeholder="Monthly installment" required="" type="number" />


        <input id="calculateBtn" type="submit" value="Calculate" />

    </form>

    <div id="result"></div>


    <script>

        document.getElementById('interestRateCalculatorForm').addEventListener('submit', function (event) {

            event.preventDefault();

            calculateInterestRate();

        });


        function calculateInterestRate() {

            var loanAmount = parseFloat(document.getElementById('loanAmount').value);

            var loanTenure = parseFloat(document.getElementById('loanTenure').value);

            var monthlyInstallment = parseFloat(document.getElementById('monthlyInstallment').value);


            var interestRate = ((monthlyInstallment * loanTenure) / loanAmount) * (12 / loanTenure) * 100;


            var resultElement = document.getElementById('result');

            resultElement.innerHTML = "Interest Rate: " + interestRate.toFixed(2) + "%";

        }

    </script>

</body>

</html>


Comments

Popular posts from this blog

IPL schedule 2025 with venue and time -ipl 2025 -full overview tata ipl 2025

рд╣рд░ рдорд╣ीрдиे 27 рд▓ाрдЦ рдФрд░ рд╕ाрд▓ाрдиा 3 рдХрд░ोреЬ 62 рд▓ाрдЦ рдХी рдХрдоाрдИ рджेрдиे рд╡ाрд▓ा рдмिреЫрдиेрд╕ рд▓ाрдЧрдд рднी рд╣ै рдХрдо

рдШрд░ рдмैрдаे рдХीрдЬिрдП рд▓рд╣рд╕ुрди , рдЧाрд░्рд▓िрдХ рдкेрд╕्рдЯ рдХी рдкैрдХिंрдЧ рдХा рдХाрдо , рд╣рд░ рдорд╣ीрдиे рдХрдоाрдП рез рд▓ाрдЦ рд░ूрдкрдпे