npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

lohnsteuer

v1.0.0

Published

Calculator of the German net tax

Downloads

3

Readme

lohnsteuer

A library to calculate German wage tax and solidarity charges.

Getting Started

Install using Yarn:

yarn add lohnsteuer

Alternatively, install using NPM:

npm install --save lohnsteuer

Note: This package comes with TypeScript typings included.

Example usage with TypeScript:

import { Bundesland, Input, Output, calculate } from 'lohnsteuer'

const input: Input = {
  // Year to calculate the tax for, 2014-2019 currently supported
  year: 2019,
  // The state (Bundesland) you calculate for
  state: Bundesland.HAMBURG,
  // The tax class (see https://www.sachsen.de/en/1451.htm)
  taxClass: 1,
  // Whether you have to pay the church tax
  churchTax: true,
  // The year you were born in
  yearOfBirth: 1990,
  // The health insurance add on your provider wants
  healthInsuranceAddOn: 0.9,
  // The gross year salary in euro cents, for € 35,000 this is:
  grossSalary: 35_000_00,
}

const output: Output = calculate(input)

The output contains the following fields, all of them are of type number and given in euro cents:

| Property | Description | |:------------------------|:---------------------------------------------------------------| | grossSalary | Gross month salary. | | salaryTax | Salary tax (Lohnsteuer) per month. | | churchTax | Church tax (Kirchensteuer) per month. | | solidarityTax | Solidarity tax (Solidaritätszuschlag) per month. | | wageTax | The complete wage tax, salary + church + solidarity tax. | | healthInsurance | Health insurance (Krankenversicherung) per month. | | pensionInsurance | Pension insurance (Rentenversicherung) per month. | | unemploymentInsurance | Unemployment insurance (Arbeitslosenversicherung) per month. | | careInsurance | Care insurance (Pflegeversicherung) per month. | | socialCharges | Sum of all social charges above: HI + PI + UI + CI. | | netSalary | The remaining net salary. |

Features and Todos

  • [x] Support basic wage tax calculation
  • [x] Calculate social charge
  • [x] Support special situation of Saxony
  • [ ] Support for children
  • [ ] Support for tax-free allowance
  • [ ] Support private insurances
  • [ ] Support care insurance without add on

License

This software is licensed under the MIT license.