Python Loan Calculator with Free Souce code

python loan calculator code

The Python loan calculator system project free Python project platform-based desktop application. this project is to calculate the loan with python and a  software development Guide. This project is open-source that allows users to download and edit as their need.

Python Loan Calculator app

The Python calculator app is a simple project developed using python. This project includes the motley payments on a loan. This project is for loan financial figures calculating .with the total payment and total interest. In this project, the user has to pay those payments over the duration of the loan.

This project file contains a python script ( This project is a simple GUI  best project which is very easy to understand and you can also use.

Python Loan Calculator Source code

from tkinter import *


#Import Tk themed widgets

from tkinter import ttk


class Loan_Calculator():


    def __init__(self):

        #creating the root window here

        root = Tk()


        #set the title

        root.title(‘Loan Calculator’)


        #set the geometry



        #set the background color



        #creating the labels

        Label(root,text=’Annual Interest Rate’,bg=’Beige’ , borderwidth = 4).grid(row=1,column = 1,sticky = W)


        Label(root,text=’Numbers of Years’,bg=’Beige’ , borderwidth = 4).grid(row=2,column = 1,sticky = W)


        Label(root,text=’Loan Ammount’,bg=’Beige’ , borderwidth = 4).grid(row=3,column = 1,sticky = W)


        Label(root,text=’Monthly Payment’,bg=’Beige’ , borderwidth = 4).grid(row=4 ,column = 1,sticky = W)


        Label(root,text=’Total Payment’,bg=’Beige’ , borderwidth = 4).grid(row=5,column = 1,sticky = W)


        #Create the Entry Widgets

        self.AnnualInterest = StringVar()

        Entry(root, textvariable = self.AnnualInterest,justify = RIGHT).grid(row = 1,column = 2,sticky = E)


        self.years = StringVar()

        Entry(root, textvariable = self.years,justify = RIGHT).grid(row = 2,column = 2,sticky = E)


        self.amount = StringVar()

        Entry(root, textvariable = self.amount,justify = RIGHT).grid(row = 3,column = 2,sticky = E)


        self.monthlyPayment = StringVar()

        Label(root, textvariable = self.monthlyPayment).grid(row = 4,column = 2,sticky = E)


        self.TotalPayment = StringVar()

        Label(root, textvariable = self.TotalPayment).grid(row = 5,column = 2,sticky = E)



        compute = Button(root, text = ‘Compute Loan’,command = self.ComputePayment).grid(row = 6, column = 2,sticky = E)




    # compute the total payment.

    def ComputePayment(self):

        month = self.getMonthlyPayment(


        float(self.AnnualInterest.get()) / 1200,


        self.monthlyPayment.set(format(month, ‘10.2f’))


        total = float(self.monthlyPayment.get()) * 12 * int(self.years.get())

        self.TotalPayment.set(format(total, ‘10.2f’))

    def getMonthlyPayment(self, loanAmount, monthlyInterestRate, numberOfYears):

        # compute the monthly payment.

        month = loanAmount * monthlyInterestRate / (1

        – 1 / (1 + monthlyInterestRate) ** (numberOfYears * 12))

        return month;



How To Run Python Loan Calculator app Project?

To run this project, you must have installed Python on your PC. After downloading the project, follow the steps below:

Step1: Extract/Unzip the file

Step2: Go inside the project folder, open cmd then type and enter to start the system.

 Click the DOWNLOAD NOW Button Below!


Download Now

1 thought on “Python Loan Calculator with Free Souce code”

  1. Pingback: Python loan payment calculator | loan repayment calculation | loan repayment calculation - Sersm | Healthy Eating, Fitness and Lifestyle Tips

Leave a Comment