项目作者: jonasgroth

项目描述 :
Calculates Swedish income tax.
高级语言: JavaScript
项目地址: git://github.com/jonasgroth/swe-income-tax.git
创建时间: 2016-11-10T16:20:03Z
项目社区:https://github.com/jonasgroth/swe-income-tax

开源协议:MIT License

下载


Swedish income tax calculator

Calculates Swedish income tax.

Install

  1. npm install swe-income-tax

Usage

  1. > var sweTax = require('swe-income-tax')
  2. > sweTax.taxDetails(300000, 0.326, 2016, 1980)
  3. {
  4. inkomst: 300000,
  5. grundavdrag: 17900,
  6. pensionsavgift: 21000,
  7. jobbskatteavdrag: 23180,
  8. kommunalskatt: 91965,
  9. statligskatt: 0,
  10. totalskatt: 68785
  11. }

API

sweTax.taxDetails(yearlyIncome, taxRate, year, birthYear)

  • @param {number} yearlyIncome The taxable income
  • @param {number} taxRate Tax rate for the municipality
  • @param {number} year Year for when money was earned
  • @param {number} birthYear Year of birth of the tax payer
  • @return {object}

Returns an object with all deductions and taxes for the given income.

sweTax.yearlyTax(yearlyIncome, taxRate, year, birthYear)

  • @param {number} yearlyIncome The taxable income
  • @param {number} taxRate Tax rate for the municipality
  • @param {number} year Year for when money was earned
  • @param {number} birthYear Year of birth of the tax payer
  • @return {number}

Returns the total tax to be paid for the entire year.

sweTax.monthlyTax(monthlyIncome, taxRate, year, birthYear)

  • @param {number} yearlyIncome The taxable income
  • @param {number} taxRate Tax rate for the municipality
  • @param {number} year Year for when money was earned
  • @param {number} birthYear Year of birth of the tax payer
  • @return {number}

Returns tax to be paid per month for a monthly income.