Giter Club home page Giter Club logo

tax-calculator-api's Introduction

TAX-CALCULATOR

Description

This is a simple tax calculator that calculates the tax of a given income. The tax is calculated based on the tax brackets for the years: 2019, 2020, 2021 and 2022. The tax brackets for 2022 are as follows:

  • 15% on the first $50,197 of income
  • 20.5% on income between $50,197 and $100,392
  • 26% on income between $100,392 and $155,625
  • 29% on income between $155,625 and $221,708
  • 33% on income over $221,708

API Usage

The API has a single endpoint that calculates the tax of a given income. The endpoint is a GET request to /tax-calulator with a query parameter of income and year. The income and year should be a number. By default year is set to 2022 and income is set to 0. The response is a JSON object with the following format:

curl -X GET "http://localhost:8080/tax-calculator?income=100000&year=2022"
{
    "total_taxes_owed": 17739.165,
    "effective_rate": 0.17739165,
    "taxes_owed_per_band": [
        {
            "range": [
                0.0,
                50197.0
            ],
            "rate": 0.15,
            "amount_owed": 7529.549999999999
        },
        {
            "range": [
                50197.0,
                100392.0
            ],
            "rate": 0.205,
            "amount_owed": 10209.615
        }
    ]
}

Check out the API documentation

The API documentation can be found at http://localhost:8080/docs in your browser.

Contributing

Contributing

tax-calculator-api's People

Watchers

John Andrews avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.