Skip to content

Commit

Permalink
fix Tarifstufen for 2024
Browse files Browse the repository at this point in the history
  • Loading branch information
bettysteger committed Sep 24, 2024
1 parent 80c7222 commit fca614c
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 19 deletions.
36 changes: 22 additions & 14 deletions src/est.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,30 @@
// @see https://www.usp.gv.at/steuern-finanzen/einkommensteuer-ueberblick/weitere-informationen-est/tarifstufen.html

export function einkommensteuer(value, year) {
let limits = year >= 2023 ? [11693, 19134, 32075, 62080, 93120, 1000000] : [11000, 18000, 31000, 60000, 90000, 1000000];
let limits = [11000, 18000, 31000, 60000, 90000, 1000000]; // 2022 and below
let percentages = [0, 0.25, 0.35, 0.42, 0.48, 0.5, 0.55]; // 2021 and below

// 2025: Alle Steuerstufen werden um knapp 4 Prozent angehoben.
// @see https://www.bmf.gv.at/presse/pressemeldungen/2024/juli/brunner-entlastung-2025.html
if (year >= 2025) {
limits = [13308, 21617, 35836, 69166, 103072, 1000000];
}
if(year >= 2024) {
percentages = [0, 0.2, 0.3, 0.4, 0.48, 0.5, 0.55]; // reduce 0.41 to 0.4 from 2023 to 2024
}
if(year === 2023) {
percentages = [0, 0.2, 0.3, 0.41, 0.48, 0.5, 0.55];
}
if(year === 2022) {
percentages = [0, 0.2, 0.325, 0.42, 0.48, 0.5, 0.55];
// add switch for limits and percentages
switch (year) {
case 2022:
percentages = [0, 0.2, 0.325, 0.42, 0.48, 0.5, 0.55];
break;
case 2023:
limits = [11693, 19134, 32075, 62080, 93120, 1000000];
percentages = [0, 0.2, 0.3, 0.41, 0.48, 0.5, 0.55];
break;
case 2024:
limits = [12816, 20818, 34513, 66612, 99266, 1000000];
percentages = [0, 0.2, 0.3, 0.4, 0.48, 0.5, 0.55]; // reduce 0.41 to 0.4 from 2023 to 2024
break;
// 2025: Alle Steuerstufen werden um knapp 4 Prozent angehoben.
// @see https://www.bmf.gv.at/presse/pressemeldungen/2024/juli/brunner-entlastung-2025.html
case 2025:
limits = [13308, 21617, 35836, 69166, 103072, 1000000];
percentages = [0, 0.2, 0.3, 0.4, 0.48, 0.5, 0.55];
break;
default:
break;
}

limits = limits.filter(limit => limit < value);
Expand Down
10 changes: 5 additions & 5 deletions tests/est.test.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { einkommensteuer, freibetragValues, investGewinnfreibetrag } from '../src/est.js';

test('should return 0 for 0-11693 income', () => {
test('should return 0 for 0-12816 income', () => {
expect(einkommensteuer(0, 2024)).toBe(0);
expect(einkommensteuer(11693, 2024)).toBe(0);
expect(einkommensteuer(11694, 2024)).not.toBe(0);
expect(einkommensteuer(12816, 2024)).toBe(0);
expect(einkommensteuer(12817, 2024)).not.toBe(0);
});

test('should return correct ESt for all levels in 2024', () => {
const limits = [11693, 19134, 32075, 62080, 93120, 1000000];
const limits = [12816, 20818, 34513, 66612, 99266, 1000000];
const percentages = [0, 0.2, 0.3, 0.4, 0.48, 0.5, 0.55];
const levels = limits.map((limit, index) => {
return {
Expand Down Expand Up @@ -52,7 +52,7 @@ test('should return correct ESt for all levels in 2022', () => {
});

test('should return correct ESt for all levels + 1€ in 2024', () => {
const limits = [11693, 19134, 32075, 62080, 93120, 1000000];
const limits = [12816, 20818, 34513, 66612, 99266, 1000000];
const percentages = [0, 0.2, 0.3, 0.4, 0.48, 0.5, 0.55];
const levels = limits.map((limit, index) => {
return {
Expand Down

0 comments on commit fca614c

Please sign in to comment.