{"id":12467,"date":"2021-09-30T11:30:32","date_gmt":"2021-09-30T06:00:32","guid":{"rendered":"https:\/\/python-programs.com\/?p=12467"},"modified":"2021-11-22T18:35:29","modified_gmt":"2021-11-22T13:05:29","slug":"python-program-to-calculate-the-income-tax","status":"publish","type":"post","link":"https:\/\/python-programs.com\/python-program-to-calculate-the-income-tax\/","title":{"rendered":"Python Program to Calculate the Income Tax"},"content":{"rendered":"
Have you mastered basic programming topics of java and looking forward to mastering advanced topics in a java programming language? Go with these ultimate Advanced java programs examples with output<\/a> & achieve your goal in improving java coding skills.<\/p>\n We will create a Python program that will assist us in calculating income tax based on certain conditions. Keep in mind that criteria are not fixed because income tax formats differ from country to country. In this code, I’m calculating income tax in Indian format.<\/p>\n Examples:<\/strong><\/p>\n Example1:<\/strong><\/p>\n Input:<\/strong><\/p>\n Output:<\/strong><\/p>\n Example2:<\/strong><\/p>\n Input:<\/strong><\/p>\n Give Income =1200000<\/p>\n Output:<\/strong><\/p>\n Below are the ways to calculate the Income Tax in Python.<\/p>\n Approach:<\/b><\/p>\n Give the income as static input and store it in a variable.<\/p>\n Now we’ll place if and else statements here to complete our income tax calculating conditions, which are as follows,<\/p>\n If your income is less than or equivalent to Rs. 2,50,000, you will pay no tax. Print the Tax.<\/p>\n The Exit of the Program.<\/p>\n Below is the implementation:<\/strong><\/p>\n Output:<\/strong><\/p>\n Approach:<\/b><\/p>\n Give the income as user input using int(input()) and store it in a variable.<\/p>\n Now we’ll place if and else statements here to complete our income tax calculating conditions, which are as follows,<\/p>\n If your income is less than or equivalent to Rs. 2,50,000, you will pay no tax. Print the Tax.<\/p>\n The Exit of the Program.<\/p>\n Below is the implementation:<\/strong><\/p>\n Output:<\/strong><\/p>\n Related Programs<\/strong>:<\/p>\n Have you mastered basic programming topics of java and looking forward to mastering advanced topics in a java programming language? Go with these ultimate Advanced java programs examples with output & achieve your goal in improving java coding skills. We will create a Python program that will assist us in calculating income tax based on …<\/p>\nGive Income = 670000<\/pre>\n
The tax for the income 670000 = 29500.0<\/pre>\n
The tax for the income 1200000 = 115000.0<\/pre>\n
Python Program to Calculate the Income Tax<\/h2>\n
\n
Method #1: Using If Statement (Static Input)<\/h3>\n
\nIf your income is less than or equal to Rs. 5,00,000, your tax will be 5% of your total income over Rs. 2,50,000.
\nIf your income is less than or equal to Rs. 7,50,000, your tax rate will be 10% of your total income beyond Rs. 5,00,000, with an additional cost of Rs. 12,500.
\nIf your income is less than or equivalent to Rs. 10,00,000, your tax rate will be 15% of your total income over Rs. 7,50,000, with an additional fee of Rs. 37,500.
\nIf your income is less than or equal to Rs. 12,50,000, your tax rate will be 20% of your total income beyond Rs. 10,00,000, with an additional fee of Rs. 75,000.
\nIf your income is less than or equal to Rs. 15,00,000, your tax rate will be 25% of your total income beyond Rs. 12,50,000, with an additional cost of Rs. 1,25,000.
\nIf your income exceeds Rs. 15,00,000, you will be taxed at 30% of the excess, with an additional fee of Rs. 1,87,500.<\/p>\n# Give the income as static input and store it in a variable.\r\ngivenincome = 670000\r\n# We will use if and else statements here to complete our income tax calculating conditions,\r\n# which are as follows,\r\n# If your income is less than or equivalent to Rs. 2,50,000,the taxAmount=0.\r\nif givenincome <= 250000:\r\n taxAmount = 0\r\n# If your income is less than or equal to Rs. 5,00,000,\r\n# the taxAmount will be 5% of your total income over Rs. 2,50,000.\r\nelif givenincome <= 500000:\r\n taxAmount = (givenincome - 250000) * 0.05\r\n# If your income is less than or equal to Rs. 7,50,000,\r\n# your taxAmount rate will be 10% of your total income\r\n# beyond Rs. 5,00,000, with an additional cost of Rs. 12,500.\r\nelif givenincome <= 750000:\r\n taxAmount = (givenincome - 500000) * 0.10 + 12500\r\n# If your income is less than or equivalent to Rs. 10,00,000,\r\n# your taxAmount rate will be 15% of your total income over Rs. 7,50,000,\r\n# with an additional fee of Rs. 37,500.\r\nelif givenincome <= 1000000:\r\n taxAmount = (givenincome - 750000) * 0.15 + 37500\r\n# If your income is less than or equal to Rs. 12,50,000,\r\n# your taxAmount rate will be 20% of your total income beyond Rs. 10,00,000,\r\n# with an additional fee of Rs. 75,000.\r\nelif givenincome <= 1250000:\r\n taxAmount = (givenincome - 1000000) * 0.20 + 75000\r\n# If your income is less than or equal to Rs. 15,00,000,\r\n# your taxAmount rate will be 25% of your total income beyond Rs. 12,50,000,\r\n# with an additional cost of Rs. 1,25,000.\r\nelif givenincome <= 1500000:\r\n taxAmount = (givenincome - 1250000) * 0.25 + 125000\r\n# If your income exceeds Rs. 15,00,000,\r\n# you will be taxed at 30% of the excess, with an additional fee of Rs. 1,87,500.\r\nelse:\r\n taxAmount = (givenincome - 1500000) * 0.30 + 187500\r\n# Print the Tax.\r\nprint('The tax for the income ', givenincome, '=', taxAmount)\r\n<\/pre>\n
The tax for the income 670000 = 29500.0<\/pre>\n
Method #2: Using For Loop (User Input)<\/h3>\n
\nIf your income is less than or equal to Rs. 5,00,000, your tax will be 5% of your total income over Rs. 2,50,000.
\nIf your income is less than or equal to Rs. 7,50,000, your tax rate will be 10% of your total income beyond Rs. 5,00,000, with an additional cost of Rs. 12,500.
\nIf your income is less than or equivalent to Rs. 10,00,000, your tax rate will be 15% of your total income over Rs. 7,50,000, with an additional fee of Rs. 37,500.
\nIf your income is less than or equal to Rs. 12,50,000, your tax rate will be 20% of your total income beyond Rs. 10,00,000, with an additional fee of Rs. 75,000.
\nIf your income is less than or equal to Rs. 15,00,000, your tax rate will be 25% of your total income beyond Rs. 12,50,000, with an additional cost of Rs. 1,25,000.
\nIf your income exceeds Rs. 15,00,000, you will be taxed at 30% of the excess, with an additional fee of Rs. 1,87,500.<\/p>\n# Give the income as user input using int(input()) and store it in a variable.\r\ngivenincome = int(input('Enter some random salary = '))\r\n# We will use if and else statements here to complete our income tax calculating conditions,\r\n# which are as follows,\r\n# If your income is less than or equivalent to Rs. 2,50,000,the taxAmount=0.\r\nif givenincome <= 250000:\r\n taxAmount = 0\r\n# If your income is less than or equal to Rs. 5,00,000,\r\n# the taxAmount will be 5% of your total income over Rs. 2,50,000.\r\nelif givenincome <= 500000:\r\n taxAmount = (givenincome - 250000) * 0.05\r\n# If your income is less than or equal to Rs. 7,50,000,\r\n# your taxAmount rate will be 10% of your total income\r\n# beyond Rs. 5,00,000, with an additional cost of Rs. 12,500.\r\nelif givenincome <= 750000:\r\n taxAmount = (givenincome - 500000) * 0.10 + 12500\r\n# If your income is less than or equivalent to Rs. 10,00,000,\r\n# your taxAmount rate will be 15% of your total income over Rs. 7,50,000,\r\n# with an additional fee of Rs. 37,500.\r\nelif givenincome <= 1000000:\r\n taxAmount = (givenincome - 750000) * 0.15 + 37500\r\n# If your income is less than or equal to Rs. 12,50,000,\r\n# your taxAmount rate will be 20% of your total income beyond Rs. 10,00,000,\r\n# with an additional fee of Rs. 75,000.\r\nelif givenincome <= 1250000:\r\n taxAmount = (givenincome - 1000000) * 0.20 + 75000\r\n# If your income is less than or equal to Rs. 15,00,000,\r\n# your taxAmount rate will be 25% of your total income beyond Rs. 12,50,000,\r\n# with an additional cost of Rs. 1,25,000.\r\nelif givenincome <= 1500000:\r\n taxAmount = (givenincome - 1250000) * 0.25 + 125000\r\n# If your income exceeds Rs. 15,00,000,\r\n# you will be taxed at 30% of the excess, with an additional fee of Rs. 1,87,500.\r\nelse:\r\n taxAmount = (givenincome - 1500000) * 0.30 + 187500\r\n# Print the Tax.\r\nprint('The tax for the income ', givenincome, '=', taxAmount)\r\n<\/pre>\n
Enter some random salary = 1200000\r\nThe tax for the income 1200000 = 115000.0<\/pre>\n
\n