Through the percentage formula you can calculate how much money you have and how much money you are borrowing. You can calculate it very easily.

 

  Github

This project is very interesting. It is done using JavaScript, you can see the GitHub code if you want.

 Usages javascript : 

function getCalculatorValue(id){

            const inputValue = document.getElementById(id);

            const inputValueString = inputValue.value;

            const inputValueNumber = parseFloat(inputValueString);

            return inputValueNumber;

          

}

function calculatorExpensesAndIncome(){

            const incomeID = getCalculatorValue('incomeID');

            const food = getCalculatorValue('food');

            const rent = getCalculatorValue('rent');

            const cloth = getCalculatorValue('cloth');

            /*  =================total expenses addision amount========================= */

            const totalAddisionValue = food + rent + cloth ;

           const totalExpenses = document.getElementById('totalExpenses');

           totalExpenses.innerText = totalAddisionValue;

          /* ========total expenses income to mainase Amount============== */

           const TotalRemainingBalance = incomeID - totalAddisionValue;

           const Balance= document.getElementById('remainingBalance');

           Balance.innerText = TotalRemainingBalance;

             

           return TotalRemainingBalance ;

}

calculatorExpensesAndIncome()

function saveMoneyAmount(){

            const saveMoney = getCalculatorValue('saveMoney');

            const totalPreviewsAmount = calculatorExpensesAndIncome();

            const PercentaceMoney = (totalPreviewsAmount * saveMoney)/100;

          

            const savingAmount = document.getElementById('savingAmount');

            savingAmount.innerText = PercentaceMoney.toFixed(2);

          

            const remainingSubtractionBalance = totalPreviewsAmount - PercentaceMoney ;

            

            const lastremainging = document.getElementById('remainingSubtraction');

            lastremainging.innerText = remainingSubtractionBalance.toFixed(2);

            

}


In today's fast-paced world, managing finances is more critical than ever. Whether you want to keep track of your monthly expenses or calculate how much you can save from your income, a simple JavaScript expense calculator can be a handy tool. In this article, we'll walk you through the process of creating a basic expense calculator using JavaScript. We'll break down the code step by step and explain how it works.Setting Up the HTML Structure: To begin, create a basic HTML structure for your calculator. You'll need input fields for income, food expenses, rent, and clothing expenses, as well as areas to display the total expenses, remaining balance, saved amount, and remaining subtracted balance.

  1. getCalculatorValue(id): This function retrieves the value of an input field by its ID and converts it to a number. It's used to get the income, food expenses, rent, clothing expenses, and percentage to save.

  2. calculatorExpensesAndIncome(): This function calculates the total expenses, remaining balance, and displays these values. It also calls the getCalculatorValue() function to get input values.

  3. saveMoneyAmount(): This function calculates the saved amount and the remaining subtracted balance based on the percentage to save. It also calls calculatorExpensesAndIncome() to get the total expenses and remaining balance.