Demo
<iframe height='265' scrolling='no' title='eERLeV' src='//codepen.io/fastfoodcoding/embed/eERLeV/?height=265&theme-id=light&default-tab=result&embed-version=2' frameborder='no' allowtransparency='true' allowfullscreen='true' style='width: 100%;'>See the Pen <a href='https://codepen.io/fastfoodcoding/pen/eERLeV/'>eERLeV</a> by fastfoodcoding (<a href='https://codepen.io/fastfoodcoding'>@fastfoodcoding</a>) on <a href='https://codepen.io'>CodePen</a>.
</iframe>
Code
<html>
<head>
<script src = "https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"> </script>
<script>
$(document).ready(function(){
$("#totalamount").click(function(){
var p = $("#actualmoney").val();
var t = $("#persentage").val();
var r = $("#months").val();
var intrest = ((+p) * (+t) * (+r)) / 100;
$("#intrestResult").val(intrest)
$("#totalResult").val((+p) + intrest)
});
});
</script>
</head>
<body>
<div>
Enter your actual money:
<input type = "text" id = "actualmoney"><br><br>
Enter your intrest persentage:
<input type = "text" id = "persentage"><br><br>
Enter your months:
<input type = "text" id = "months"><br><br>
<button type = "button" id = "totalamount">Totalamount</button><br><br>
Intrestamount:
<input type = "text" id = "intrestResult">
Totalamount:
<input type = "text" id = "totalResult">
</div>
</body>
</html>