# Einkommensteuer-Rechner - Comprehensive Documentation

**Last Updated:** 2026-02-11

## Tool Overview

### Basic Information

- **Tool Name:** Einkommensteuer-Rechner (Income Tax Calculator)
- **Slug:** `einkommensteuer-rechner`
- **URL:** `https://www.ordio.com/tools/einkommensteuer-rechner`
- **Status:** Available
- **Last Updated:** 2026-02-11

### Purpose

Comprehensive calculator for German income tax (Einkommensteuer) for 2026. Calculates income tax, effective tax rate, marginal tax rate, solidarity surcharge, church tax, and net income based on annual income, tax class, and optional deductions. Includes 3 modes: Berechnung (single form with optional "Erweiterte Optionen" for children, deductions, church tax), Steuersatz-Tabelle, and Vergleich. Based on official German tax law (EStG §32a).

### Use Cases

- **Employees:** Calculate annual income tax and net income
- **Self-Employed:** Estimate income tax for tax planning
- **HR Professionals:** Calculate tax implications for salary negotiations
- **Tax Advisors:** Quick tax calculations for clients
- **Financial Planners:** Tax planning and optimization scenarios

### Real-World Scenarios

**Scenario 1: Employee Planning Annual Tax Return**

- **User:** Employee preparing for tax filing
- **Situation:** Earned €55,000 gross in 2026, Tax Class I, wants to estimate tax liability
- **Goal:** Understand annual tax amount and effective tax rate before filing
- **Steps:**
  1. Enter €55,000 Jahreseinkommen
  2. Select Tax Class I
  3. Select year 2026
  4. Review calculated income tax, effective tax rate, marginal tax rate
  5. Expand "Erweiterte Optionen" to add deductions (Werbungskosten, Sonderausgaben) if needed
  6. Export results as Excel for tax filing reference
- **Result:** Sees €55,000 = ~€8,500 income tax (15.5% effective rate), can plan deductions
- **Related Tools:** [Brutto-Netto-Rechner](brutto-netto-rechner-documentation.md) (for monthly net calculation), [Arbeitslosengeld-Rechner](arbeitslosengeld-rechner-documentation.md) (if unemployed)

**Scenario 2: Self-Employed Tax Planning**

- **User:** Freelancer planning quarterly tax payments
- **Situation:** Expects €80,000 annual income, needs to estimate quarterly tax payments
- **Goal:** Calculate annual tax and divide by 4 for quarterly payments
- **Steps:**
  1. Enter €80,000 Jahreseinkommen
  2. Select appropriate tax class (I or III if married)
  3. Expand "Erweiterte Optionen" to add Werbungskosten (business expenses)
  4. Review total tax liability
  5. Divide by 4 for quarterly payment estimate
  6. Use Tax Rate Table mode to see progressive rates
- **Result:** Sees €80,000 = ~€18,000 tax, plans €4,500 quarterly payments
- **Related Tools:** [Brutto-Netto-Rechner](brutto-netto-rechner-documentation.md) (for net income planning)

**Scenario 3: HR Manager Evaluating Salary Increase Impact**

- **User:** HR professional evaluating tax impact of salary increase
- **Situation:** Employee currently earns €50,000, considering raise to €60,000
- **Goal:** Understand tax impact and net income increase
- **Steps:**
  1. Calculate current tax: €50,000 = ~€7,500 tax
  2. Calculate new tax: €60,000 = ~€11,000 tax
  3. Use Comparison Mode to compare both scenarios side-by-side
  4. Review marginal tax rate to understand tax on additional income
  5. Calculate net income difference
- **Result:** Sees €10,000 gross increase = ~€6,500 net increase (35% marginal rate)
- **Related Tools:** [Brutto-Netto-Rechner](brutto-netto-rechner-documentation.md) (for monthly net comparison)

**Scenario 4: Tax Advisor Quick Client Calculation**

- **User:** Tax advisor preparing client consultation
- **Situation:** Client asks about tax implications of €45,000 income, Tax Class III
- **Goal:** Quick calculation for client meeting
- **Steps:**
  1. Enter €45,000 Jahreseinkommen
  2. Select Tax Class III
  3. Expand "Erweiterte Optionen" to add client's deductions (children, expenses)
  4. Review detailed breakdown
  5. Export as PDF to share with client
- **Result:** Provides client with detailed tax calculation and PDF for reference
- **Related Tools:** [Brutto-Netto-Rechner](brutto-netto-rechner-documentation.md) (for monthly net calculation)

### Target Audience

- Employees in Germany
- Self-employed individuals
- HR professionals
- Tax advisors
- Financial planners

### Visual Description

**Hero Section:**

- Layout: Centered hero section with badge, headline, and description
- Badge: "Einkommensteuer Rechner" badge
- Headline: Large bold headline "Einkommensteuer Rechner 2026: Steuerlast kostenlos berechnen" with blue accent
- Description: Paragraph explaining calculator features (2026 tax rates, tax rate table, allowances, detailed breakdown, Excel/PDF export)
- Trust Indicators: Three badges showing "2026 aktuell", "100% kostenlos", "Excel & PDF Export"
- Background: Subtle dot pattern background

**Visual Examples (To Be Added):**

**Hero Section Screenshot:**

- Location: `docs/guides/tools-pages/screenshots/einkommensteuer-rechner-hero.png`
- Description: Full hero section showing badge, headline, description, and trust indicators
- Dimensions: 1920x1080 (desktop), 375x667 (mobile)
- Shows: Complete above-fold content with visual styling

**Calculator Form Screenshot:**

- Location: `docs/guides/tools-pages/screenshots/einkommensteuer-rechner-form.png`
- Description: Calculator form showing 3 modes (Berechnung with optional Erweiterte Optionen, Steuersatz-Tabelle, Vergleich)
- Dimensions: 1920x1080 (desktop)
- Shows: Mode tabs, input fields, calculate button, form styling

**Result Display Screenshot:**

- Location: `docs/guides/tools-pages/screenshots/einkommensteuer-rechner-results.png`
- Description: Results section showing tax calculation, breakdown cards, export buttons
- Dimensions: 1920x1080 (desktop)
- Shows: Primary tax amount, effective/marginal rates, detailed breakdown, Excel/PDF export

**Tax Rate Table Screenshot:**

- Location: `docs/guides/tools-pages/screenshots/einkommensteuer-rechner-tax-table.png`
- Description: Tax rate table mode showing progressive tax rates
- Dimensions: 1920x1080 (desktop)
- Shows: Income ranges, tax rates, visual table representation

**Workflow Diagram:**

- Location: `docs/guides/tools-pages/diagrams/einkommensteuer-rechner-workflow.svg`
- Description: Flow diagram showing calculation process from input to results
- Format: SVG (vector) for scalability
- Shows: Input → Validation → Tax Calculation → Surcharges → Results → Export flow

**Calculator Modes:**

- Mode Tabs: Three-button tab navigation (Berechnung, Steuersatz-Tabelle, Vergleich)
- Berechnung: Core inputs (Jahreseinkommen, Steuerklasse, Jahr) with optional "Erweiterte Optionen" (Anzahl Kinder, Werbungskosten, Sonderausgaben, Kirchensteuer, Bundesland) via progressive disclosure
- Tax Rate Table Mode: Generate tax rate table for income range
- Comparison Mode: Compare two scenarios side-by-side

**Form Section:**

- Layout: Centered single-column layout with grid for inputs
- Berechnung mode inputs:
  - Core (always visible): Jahreseinkommen (€), Steuerklasse (I–VI), Jahr (2026, 2025, 2024)
  - Erweiterte Optionen (progressive disclosure): Anzahl Kinder, Werbungskosten (€, default 1,230), Sonderausgaben (€), Kirchensteuer (toggle), Bundesland (if Kirchensteuer = Ja)
- Tax Rate Table Mode Inputs:
  - Min. Einkommen: Number input (€)
  - Max. Einkommen: Number input (€)
  - Schrittweite: Number input (€, default: 5,000)
  - Steuerklasse: Select dropdown
- Comparison Mode Inputs:
  - Two side-by-side scenarios (Szenario 1, Szenario 2)
  - Each with: Jahreseinkommen, Steuerklasse
- **Jetzt berechnen button:** The user must click "Jetzt berechnen" to run the calculation and see the results/report. The report section is shown only after this action (consistent with Urlaubsanspruch and Stundenlohnrechner). When switching mode (Berechnung, Steuersatz-Tabelle, Vergleich), the report is hidden until the user clicks "Jetzt berechnen" again in the new mode.
- Result section: The block with Excel/PDF export and the main result cards (id `einkommensteuer-report`); scrolls into view after a successful calculation.
- Styling: Blue accent color (#4D8EF3), rounded inputs, responsive layout

**Result Display:**

- Layout: Below form, centered
- Results Summary: Large card showing:
  - Primary Result: Large bold display (blue accent) - Einkommensteuer amount
  - Secondary Results: Summary cards with icons showing:
    - Zu versteuerndes Einkommen
    - Effektiver Steuersatz
    - Grenzsteuersatz
    - Solidaritätszuschlag
    - Kirchensteuer (if applicable)
    - Nettoeinkommen
- Tax Rate Table Mode: Displays interactive table with income ranges and corresponding tax rates
- Comparison Mode: Side-by-side comparison of two scenarios
- Export Buttons: Excel and PDF export (email gating)
- Styling: White cards, blue accent for totals, responsive tables

### UI/UX Flow

**Initial Load:**

- Page loads with hero section visible
- Calculator displayed in Berechnung mode by default
- Default values:
  - Berechnung: Jahreseinkommen = 50,000€, Steuerklasse = I, Jahr = 2026; optional fields (when expanded): Anzahl Kinder = 0, Werbungskosten = 1,230€, Sonderausgaben = 0, Kirchensteuer = false
  - Tax Rate Table: Min = 0€, Max = 100,000€, Schrittweite = 5,000€, Steuerklasse = I
  - Comparison: Both scenarios default to 50,000€, Steuerklasse I
- No results displayed initially

**Calculation Flow:**

1. User selects mode (Berechnung, Tax Rate Table, Comparison)
2. User enters inputs (mode-specific)
3. Calculation runs automatically (debounced, 300ms for numbers, 100ms for selects/toggles)
4. Results display below form
5. User can switch modes (cache cleared, recalculation)
6. User can export results (Excel/PDF) - email required

**Mode Switching:**

1. User clicks mode tab
2. Mode switches (Basic ↔ Advanced ↔ Tax Rate Table ↔ Comparison)
3. Cache cleared
4. Calculation runs automatically with current values
5. First input focused automatically

**Export Flow:**

- Export (Excel/PDF) is available only after the user has run a calculation (report section visible). The export buttons are in the result block (`einkommensteuer-report`).
1. User clicks Excel or PDF export button
2. If email not collected: Email modal appears
3. User enters email address
4. Email submitted to HubSpot API
5. Email stored in localStorage
6. Export generated and downloaded
7. Future exports skip email collection

## Technical Documentation

### File Structure

- **PHP File:** `v2/pages/tools_einkommensteuer_rechner.php` (~1,504 lines)
- **JavaScript Files:** Modular structure in `v2/js/einkommensteuer/`
  - `constants.js` - 2026 tax constants (GRUNDFREIBETRAG, KINDERFREIBETRAG, TAX_BRACKETS, etc.)
  - `utils.js` - Formatting and validation utilities (formatCurrency, formatPercent, formatNumber)
  - `helpers.js` - Calculation helper functions (calculateTaxableIncome, calculateProgressiveTax)
  - `calculator.js` - Main Alpine.js component (~1,000+ lines)
  - `export.js` - Excel/PDF export functionality (lazy-loaded)
- **CSS:** Uses shared `v2/css/tools-pages.css` plus inline critical CSS

### Calculation Modes

**Single Calculation Engine, 3 Modes:**

The calculator has one calculation engine and 3 tab modes:

**Mode 1: Berechnung (single form with optional Erweiterte Optionen)**

- **Visual Description:** Form with core inputs (Jahreseinkommen, Steuerklasse, Jahr) and an optional "Erweiterte Optionen anzeigen/ausblenden" section (progressive disclosure) for Anzahl Kinder, Werbungskosten, Sonderausgaben, Kirchensteuer, Bundesland.
- **Purpose:** Income tax calculation with standard or custom deductions in one place.
- **Input Fields:**
  - Core: Jahreseinkommen (€), min=0, step=1, placeholder="50000"; Steuerklasse (I–VI); Jahr (2026, 2025, 2024)
  - Erweiterte Optionen (when expanded): Anzahl Kinder (min=0), Werbungskosten (€, default 1,230), Sonderausgaben (€), Kirchensteuer (toggle), Bundesland (if Kirchensteuer = true)
- **Output Fields:**
  - Einkommensteuer: Large display (blue accent)
  - Zu versteuerndes Einkommen, Effektiver Steuersatz, Grenzsteuersatz: Summary cards
  - Solidaritätszuschlag: Summary card (shown when > 0)
  - Kirchensteuer: Summary card (shown when > 0)
  - Nettoeinkommen: Summary card
- **Formula:** Uses progressive tax brackets (EStG §32a) with full deduction support.
- **Calculation Steps:**
  1. Calculate taxable income: Annual income - Grundfreibetrag - Kinderfreibetrag - Werbungskosten - Sonderausgaben
  2. Apply progressive tax brackets
  3. Calculate solidarity surcharge (5.5% of income tax if above threshold)
  4. Calculate church tax (8–9% of income tax if applicable)
  5. Calculate net income: Annual income - Total tax
- **Example (core only):** Jahreseinkommen = 50,000€, Steuerklasse = I → Taxable income ≈ 36,422€, Einkommensteuer ≈ 5,500€, Nettoeinkommen ≈ 44,197€.
- **Example (with Erweiterte Optionen):** + Anzahl Kinder = 2, Werbungskosten = 2,000€, Kirchensteuer = Ja, Bayern → Taxable income ≈ 20,996€, Einkommensteuer ≈ 2,000€, Kirchensteuer = 160€, Nettoeinkommen ≈ 47,840€.
- **Edge Cases:** Zero income, very high income (>277,825€), multiple children, church tax by state.

**Mode 2: Tax Rate Table (Steuersatz-Tabelle)**

- **Visual Description:** Form with 4 inputs and interactive table display
- **Purpose:** Generate tax rate table for income range
- **Input Fields:**
  - Min. Einkommen: Number input (€), min=0, step=1000, placeholder="0"
  - Max. Einkommen: Number input (€), min=0, step=1000, placeholder="100000"
  - Schrittweite: Number input (€), min=1000, step=1000, placeholder="5000"
  - Steuerklasse: Select dropdown (I-VI)
- **Output Fields:**
  - Interactive table showing:
    - Einkommen (income range)
    - Zu versteuerndes Einkommen
    - Einkommensteuer
    - Effektiver Steuersatz
    - Grenzsteuersatz
- **Formula:** Same progressive tax calculation applied to each income step
- **Calculation Steps:**
  1. Generate income steps from min to max with step size
  2. Calculate tax for each income level
  3. Display in sortable table
- **Example:**
  - Input: Min = 0€, Max = 100,000€, Schrittweite = 10,000€, Steuerklasse = I
  - Output: Table with rows for 0€, 10,000€, 20,000€, ..., 100,000€ showing tax for each
- **Edge Cases:** Handles large ranges, small step sizes, table sorting

**Mode 3: Comparison (Vergleich)**

- **Visual Description:** After "Jetzt berechnen", a comparison report is shown:
  - **Comparison header:** Dedicated header with icon, title "Vergleich der Szenarien", subtitle "Unterschiede zwischen Szenario 1 und 2" (bg-ordio-blue/5).
  - **Summary line:** Styled differently for same vs different results. When same: neutral gray. When different: green-tinted background with "Mehr Netto" badge.
  - **Comparison bar chart:** CSS-based horizontal bar chart (4 rows) showing Nettoeinkommen, Einkommensteuer, Zu versteuerndes Einkommen, Effektiver Steuersatz. Two bars per row (Szenario 1 = Ordio blue, Szenario 2 = gray); bar width scales to max of that row. Legend and value labels per row. Helper: `getComparisonChartData()`.
  - **Scenario cards:** Two content-block-card style cards, side-by-side on desktop, stacked on mobile. Szenario 1 has blue left border; Szenario 2 has gray left border. Each card shows:
    - Input context: "50.000 € • Steuerklasse I" (from getScenarioInputSummary)
    - "Mehr Netto" badge on the winning card when scenarios differ
    - Metrics: Zu versteuerndes Einkommen, Einkommensteuer, Solidaritätszuschlag (if > 0), Kirchensteuer (if > 0), Effektiver Steuersatz, Nettoeinkommen
  - **Differenz block:** When scenarios differ, a blue-tinted block shows Netto-Differenz (Szenario 2 − 1) and Steuer-Differenz (Szenario 1 − 2) with green/red color-coding.
  - **Disclaimer and CTA:** Content-block-callout for legal disclaimer; separate CTA block with prominent "Kostenlosen Rückruf anfordern" button.
- **Purpose:** Compare tax implications of two scenarios with clear, scannable output and input context.
- **Input Fields:**
  - Szenario 1: Jahreseinkommen, Steuerklasse
  - Szenario 2: Jahreseinkommen, Steuerklasse
- **Output Fields (per scenario card):**
  - Zu versteuerndes Einkommen
  - Einkommensteuer
  - Solidaritätszuschlag (when > 0)
  - Kirchensteuer (when > 0)
  - Effektiver Steuersatz
  - Nettoeinkommen
- **Formula:** Same as Berechnung mode applied to both scenarios.
- **Calculation Steps:**
  1. Calculate tax for Scenario 1
  2. Calculate tax for Scenario 2
  3. Display explicit summary line (which scenario is better or "same result")
  4. Display both results in two white cards, same metric order
- **Export (Comparison mode):** Excel and PDF both support comparison mode. **Excel:** Side-by-side table with summary line, inputs (Jahreseinkommen, Steuerklasse as Roman I–VI), full results (Zu versteuerndes Einkommen, Einkommensteuer, Solidaritätszuschlag/Kirchensteuer when >0, Effektiver Steuersatz, Nettoeinkommen), and Differenz block. **PDF:** Summary line ("Szenario X bringt Y mehr Netto" or "Beide Szenarien führen zum gleichen Ergebnis"), both scenarios with full metrics, Differenz, and legal disclaimer. Filename: `Ordio_Einkommensteuer_Vergleich_<date>.xlsx` / `.pdf`.
- **Example:**
  - Input: Szenario 1 = 50,000€ (Steuerklasse I), Szenario 2 = 50,000€ (Steuerklasse III)
  - Output: Summary line plus two cards; comparison showing lower tax for Steuerklasse III due to splitting benefits.
- **Edge Cases:** Handles equal scenarios (summary: "Beide Szenarien führen zum gleichen Ergebnis."), very different scenarios.

### Constants and Thresholds

**2026 Values:**

- GRUNDFREIBETRAG: 12,348€ (was 12,096€ in 2025)
- KINDERFREIBETRAG: 6,828€ per child (was 6,672€ in 2025)
- WERBUNGSKOSTEN_PAUSCHAL: 1,230€ (standard deduction)
- TAX_BRACKETS:
  - BRACKET_1_MAX: 12,348€ (0% to 14%)
  - BRACKET_2_MAX: 68,429€ (14% to 42%)
  - BRACKET_3_MAX: 277,825€ (42%)
  - BRACKET_4: Above 277,825€ (45%)
- SOLIDARITY_RATE: 5.5%
- SOLIDARITY_THRESHOLD_SINGLE: 19,950€
- SOLIDARITY_THRESHOLD_MARRIED: 39,900€
- CHURCH_TAX_RATE_BW: 8% (Bayern, Baden-Württemberg)
- CHURCH_TAX_RATE_OTHER: 9% (all other states)

**Previous Values (for reference):**

- 2025: GRUNDFREIBETRAG = 12,096€, KINDERFREIBETRAG = 6,672€
- 2024: GRUNDFREIBETRAG = 11,604€, KINDERFREIBETRAG = 6,384€

### Validation Rules

- Jahreseinkommen: min=0, step=1, no max limit
- Anzahl Kinder: min=0, step=1, integer only
- Werbungskosten: min=0, step=1
- Sonderausgaben: min=0, step=1
- Min/Max Einkommen (Table mode): min=0, step=1000
- Schrittweite: min=1000, step=1000

### Edge Cases Handled

- Zero income: Returns zero tax
- Very high income (>277,825€): Applies 45% top rate
- Negative taxable income: Returns zero tax
- Solidarity surcharge threshold: Only applies if income tax exceeds threshold
- Church tax: Only applies if toggle enabled and user is member
- Multiple children: Multiplies Kinderfreibetrag correctly
- High deductions: Handles deductions exceeding income (returns zero tax)

### Dependencies

- External Libraries:
  - XLSX.js (v0.18.5) - Excel export
  - jsPDF (v2.5.1) - PDF export
- APIs: HubSpot Forms API (for email collection)
- Alpine.js: Used for reactive UI (version from base/head.php)

### Code Organization

**File Structure:**

- PHP: `v2/pages/tools_einkommensteuer_rechner.php` (~1,504 lines)
- JavaScript: Modular structure in `v2/js/einkommensteuer/`
  - `constants.js` (~118 lines) - All tax constants
  - `utils.js` (~80 lines) - Formatting utilities
  - `helpers.js` (~150 lines) - Calculation helpers
  - `calculator.js` (~1,000+ lines) - Main Alpine.js component
  - `export.js` (~300 lines) - Export functionality
- CSS: Shared `v2/css/tools-pages.css` plus inline critical CSS

**Modular Structure:**

- **constants.js:** All 2026 tax constants, brackets, rates, thresholds
- **utils.js:** Formatting functions (formatCurrency, formatPercent, formatNumber)
- **helpers.js:** Calculation functions (calculateTaxableIncome, calculateProgressiveTax)
- **calculator.js:** Main Alpine.js component with 3 modes (basic, table, comparison), state management, calculation logic
- **export.js:** Excel/PDF export functions (lazy-loaded)

**Code Patterns:**

- Alpine.js reactive data binding (`x-data`, `x-model`, `x-show`)
- Debounced calculations (300ms for numbers, 100ms for selects)
- Modular JavaScript (window namespace pattern)
- Email gating for exports (localStorage caching)
- Progressive enhancement (works without JavaScript for basic display)

### Functions & Methods

**Main Component Function:**

- Function Name: `einkommensteuerCalculator()`
- Location: `v2/js/einkommensteuer/calculator.js`
- Purpose: Main Alpine.js component with all calculator logic
- Returns: Alpine.js component object with state and methods

**Calculation Functions:**

- `calculateTaxableIncome()`: Calculates taxable income after deductions
  - Location: `v2/js/einkommensteuer/helpers.js`
  - Parameters: annualIncome, grundfreibetrag, kinderfreibetrag, numberOfChildren, werbungskosten, sonderausgaben
  - Returns: Taxable income amount
- `calculateProgressiveTax()`: Calculates progressive income tax
  - Location: `v2/js/einkommensteuer/helpers.js`
  - Parameters: taxableIncome
  - Returns: Income tax amount
- `calculateSolidarity()`: Calculates solidarity surcharge
  - Location: `v2/js/einkommensteuer/calculator.js`
  - Parameters: incomeTax, taxClass
  - Returns: Solidarity surcharge amount
- `calculateChurchTax()`: Calculates church tax
  - Location: `v2/js/einkommensteuer/calculator.js`
  - Parameters: incomeTax, state, hasChurchTax
  - Returns: Church tax amount

**Helper Functions:**

- `formatCurrency()`: Formats numbers as currency (€)
  - Location: `v2/js/einkommensteuer/utils.js`
  - Parameters: amount, includeSymbol
  - Returns: Formatted string (e.g., "5.000,00 €")
- `formatPercent()`: Formats numbers as percentage
  - Location: `v2/js/einkommensteuer/utils.js`
  - Parameters: decimal
  - Returns: Formatted string (e.g., "11,0 %")
- `formatNumber()`: Formats numbers with German locale
  - Location: `v2/js/einkommensteuer/utils.js`
  - Parameters: number, decimals
  - Returns: Formatted string

**Export Functions:**

- `exportExcel()`: Exports calculation as Excel file
  - Location: `v2/js/einkommensteuer/export.js`
  - Parameters: calculator state
  - Data Included: All inputs, all results, tax breakdown
  - Format: XLSX format with multiple sheets
  - File Name: `einkommensteuer-berechnung-[timestamp].xlsx`
- `exportPDF()`: Exports calculation as PDF file
  - Location: `v2/js/einkommensteuer/export.js`
  - Parameters: calculator state
  - Content Included: Summary, inputs, results, tax breakdown
  - Layout: A4 portrait, branded header
  - File Name: `einkommensteuer-berechnung-[timestamp].pdf`

**Utility Functions:**

- `init()`: Initializes calculator on page load
  - Location: `v2/js/einkommensteuer/calculator.js`
  - Purpose: Sets default values, loads saved email, initializes calculation
- `calculate()`: Main calculation function
  - Location: `v2/js/einkommensteuer/calculator.js`
  - Purpose: Triggers calculation for current mode, updates results
- `validateInputs()`: Validates all inputs
  - Location: `v2/js/einkommensteuer/calculator.js`
  - Purpose: Checks input validity, sets error messages

**Event Handlers:**

- `@click` handlers: Mode switching, export buttons, email modal
- `@input` handlers: Auto-calculation on input change (debounced)
- `x-init`: Initializes calculator on page load

### State Management

**Alpine.js State Variables:**

- `mode`: Current mode ('basic', 'advanced', 'table', 'comparison')
- `showResults`: Boolean, whether to show results
- `hasError`: Boolean, whether there's an error
- `errorMessage`: String, error message text
- `emailCollected`: Boolean, whether email has been collected
- `showEmailModal`: Boolean, whether email modal is visible
- `basic`: Object with basic mode inputs and results
- `advanced`: Object with advanced mode inputs and results
- `table`: Object with table mode inputs
- `comparison`: Object with comparison mode inputs and results
- `states`: Array of German states (for church tax)

**Computed Properties:**

- `CONSTANTS`: Getter for tax constants (throws error if not loaded)
- `UTILS`: Getter for utility functions (throws error if not loaded)
- `HELPERS`: Getter for helper functions (throws error if not loaded)

**Watchers:**

- `$watch('mode')`: Clears cache and recalculates when mode changes
- `$watch('basic.annualIncome')`: Triggers calculation on input change
- `$watch('advanced.annualIncome')`: Triggers calculation on input change

**localStorage:**

- Key: `einkommensteuer_export_email`: Stores email address for future exports
- Set: When user submits email in modal
- Read: On page load to pre-fill email modal

**URL Parameters:**

- None currently implemented

## Calculation Logic

### Formula Documentation

**Primary Formula (Progressive Tax - EStG §32a):**

The German income tax uses a progressive tax system with multiple brackets:

```
Taxable Income = Annual Income - Grundfreibetrag - Kinderfreibetrag - Werbungskosten - Sonderausgaben

If Taxable Income <= 12,348€:
  Tax = 0€

If 12,349€ <= Taxable Income <= 68,429€:
  Tax = (Taxable Income - 12,348€) × Progressive Rate (14% to 42%)

If 68,430€ <= Taxable Income <= 277,825€:
  Tax = Base Amount + (Taxable Income - 68,429€) × 42%

If Taxable Income > 277,825€:
  Tax = Base Amount + (Taxable Income - 277,825€) × 45%

Solidarity Surcharge = Income Tax × 5.5% (if Income Tax > Threshold)
Church Tax = Income Tax × 8% or 9% (if applicable)

Total Tax = Income Tax + Solidarity Surcharge + Church Tax
Net Income = Annual Income - Total Tax
```

**Step-by-Step Process:**

1. Calculate taxable income: Annual income minus all deductions
2. Apply progressive tax brackets based on taxable income
3. Calculate solidarity surcharge (5.5% of income tax if above threshold)
4. Calculate church tax (8-9% of income tax if user is member)
5. Sum all taxes to get total tax
6. Calculate net income: Annual income minus total tax
7. Calculate effective tax rate: (Total tax / Annual income) × 100%
8. Calculate marginal tax rate: Tax rate on next Euro earned

### Example Calculation

**Input:**

- Jahreseinkommen: 50,000€
- Steuerklasse: I (Ledig)
- Jahr: 2026
- Anzahl Kinder: 0
- Werbungskosten: 1,230€ (standard)
- Sonderausgaben: 0€
- Kirchensteuer: Nein

**Calculation:**

1. Taxable Income = 50,000 - 12,348 - 1,230 = 36,422€
2. Income Tax Calculation:
   - First bracket (0-12,348€): 0€
   - Second bracket (12,349-68,429€): Progressive calculation
   - Tax ≈ 5,500€
3. Solidarity Surcharge:
   - Income Tax (5,500€) > Threshold (19,950€)? No
   - Solidarity Surcharge = 0€
4. Church Tax: 0€ (not applicable)
5. Total Tax = 5,500€
6. Net Income = 50,000 - 5,500 = 44,500€
7. Effective Tax Rate = (5,500 / 50,000) × 100% = 11.0%
8. Marginal Tax Rate = ~24% (rate on next Euro)

**Expected Result:**

- Einkommensteuer: 5,500€
- Zu versteuerndes Einkommen: 36,422€
- Effektiver Steuersatz: 11.0%
- Grenzsteuersatz: ~24%
- Solidaritätszuschlag: 0€
- Nettoeinkommen: 44,500€

### Legal Basis

- **Einkommensteuergesetz (EStG) §32a:** Progressive tax brackets and rates
- **Grundfreibetrag:** €12,348 (2026) - Tax-free allowance
- **Kinderfreibetrag:** €6,828 per child (2026) - Child allowance
- **Werbungskostenpauschale:** €1,230 (2026) - Standard deduction for work expenses
- **Solidaritätszuschlaggesetz:** 5.5% surcharge on income tax above threshold
- **Kirchensteuergesetze:** 8-9% surcharge on income tax (state-dependent)

## Content Documentation

### Hero Section

- **H1:** "Einkommensteuer Rechner 2026: Steuerlast kostenlos berechnen"
- **Description:** "Berechne kostenlos deine Einkommensteuer für 2026. Aktuell nach offiziellen Steuersätzen. Inkl. Steuersatz-Tabelle, Freibeträge & detaillierter Aufstellung. Export als Excel oder PDF."

### Educational Content Sections (4 sections, ~600-700 words)

1. **Wie funktioniert der Einkommensteuer Rechner?**
   - H3: Eingabe, Ergebnis, Export (aligns with HowTo schema)
   - Internal link: Brutto-Netto-Rechner
   - Keywords: lohnsteuer berechnen, steuersatz berechnen, nettoeinkommen berechnen

2. **Was wird bei der Einkommensteuer berechnet?**
   - Freibeträge und Abzüge: Grundfreibetrag 2026, Kinderfreibetrag, Werbungskosten-Pauschale, Sonderausgaben-Pauschbetrag (36€)
   - Steuersätze: steuersatz berechnen, steuersatz tabelle, einkommensteuer grundtabelle, grenzsteuersatz berechnen
   - Zusätzliche Abgaben: solidaritätszuschlag berechnen, kirchensteuer berechnen (Freigrenzen)
   - Konkrete Berechnungsbeispiele: 30k, 50k, 75k, 100k € (Steuerklasse I, 2026)

3. **Für wen ist der Einkommensteuer Rechner geeignet?**
   - Angestellte: steuerklasse berechnen, internal link Brutto-Netto-Rechner
   - Selbstständige: einkommensteuer selbstständige
   - Rentner: einkommensteuer rentner
   - Callout: "Wichtig: Der Rechner gibt eine Schätzung"

4. **Einkommensteuer Tabelle 2026**
   - Targets: einkommensteuer tabelle, steuersatz tabelle
   - Links to calculator's Steuersatz-Tabelle tab

### FAQ Section

- **Total FAQs:** 17 questions (after SEO audit merge of duplicates, 2026-02-11)
- **FAQ Topics:**
  - Tax rates and brackets: 5 FAQs
  - Calculation methods: 4 FAQs
  - Deductions and allowances: 3 FAQs
  - Tax classes: 2 FAQs
  - Export functionality: 1 FAQ
  - Other: 3 FAQs

**Sample FAQs:**

1. **Welcher Steuersatz bei welchem Einkommen?**

   - Answer: Progressive system from 14% to 45%, detailed bracket explanation

2. **Wie berechne ich die Höhe der Einkommensteuer?**

   - Answer: EStG §32a calculation process, step-by-step explanation

3. **Wie hoch ist der Freibetrag für Einkommensteuer?**

   - Answer: Grundfreibetrag €12,348, Kinderfreibetrag €6,828 per child (2026)

4. **Was ist der Unterschied zwischen effektivem und Grenzsteuersatz?**

   - Answer: Effective rate = total tax / income, marginal rate = rate on next Euro

5. **Kann ich die Berechnung exportieren?**
   - Answer: Yes, Excel and PDF export available after calculation

### Meta Tags

- **Title:** "Einkommensteuer Rechner 2026: Steuerlast kostenlos berechnen - Ordio"
- **Description:** "Berechne kostenlos deine Einkommensteuer für 2026. Aktuell nach offiziellen Steuersätzen. Inkl. Steuersatz-Tabelle, Freibeträge & detaillierter Aufstellung. Export als Excel oder PDF."
- **Keywords:** "einkommensteuer rechner, einkommensteuer rechner 2026, steuersatz berechnen, einkommensteuer tabelle, steuersatz tabelle, einkommensteuer freibetrag, lohnsteuer berechnen"

### Schema Markup

- **WebPage schema:** Page metadata, breadcrumbs
- **HowTo schema:** Step-by-step calculation process
- **FAQPage schema:** 17 FAQ questions and answers
- **BreadcrumbList schema:** Navigation breadcrumbs

### Internal Linking

- Content blocks: 2 links to Brutto-Netto-Rechner (Section 1, Section 3 Angestellte)
- FAQs: 2 links to Brutto-Netto-Rechner (faq-7, faq-9)
- Total: ~4+ internal links

## Change Log

### Update History

**2026-02-11:**

- SEO/AEO/GEO audit: Content blocks updated (Drei Modi, reduced AI tells, Freibeträge und Abzüge)
- Content block expansion: 4 sections, SISTRIX keyword integration, Konkrete Berechnungsbeispiele, Section 4 (Einkommensteuer Tabelle)
- Internal links in content: 2 (Brutto-Netto-Rechner)
- CTA: Tool-specific "Steuerplanung und Lohnabrechnung mit Ordio"
- AI meta tags: citation-format, tool-purpose, tool-benefits, target-audience
- FAQ merge: 20 → 17 FAQs (removed duplicates); FAQPage schema synced
- Design: Tax table gradient removed (solid + shadow); tab navigation migrated to ordio-tabs
- SISTRIX keyword research: `docs/content/tools/einkommensteuer-sistrix.json`

**2026-01-08:**

- Created comprehensive documentation
- Documented all 3 calculation modes (Berechnung, Steuersatz-Tabelle, Vergleich)
- Extracted FAQs from schema markup
- Documented technical implementation
- Added calculation formulas and examples

**Previous Updates:**

- Tool created with 2026 tax rates
- Constants updated annually for new tax year

## Annual Update Checklist

**For Annual Updates (typically January):**

- [ ] Update "Last Updated" date
- [ ] Update constants section with new values (GRUNDFREIBETRAG, KINDERFREIBETRAG, TAX_BRACKETS)
- [ ] Update example calculations with new values
- [ ] Update content sections (H1, descriptions, FAQs) with new year
- [ ] Update 2026 Update Requirements section (mark complete)
- [ ] Remove any "(pending verification)" notes
- [ ] Verify all legal references are current (EStG §32a)
- [ ] Update meta tags if needed
- [ ] Update schema markup if needed
- [ ] Test all calculations with new values
- [ ] Document changes in change log

## 2026 Update Requirements

### Immediate Updates (Required for Jan 1, 2026)

**Constants/Values:**

- [x] GRUNDFREIBETRAG: Updated from 12,096€ (2025) to 12,348€ (2026)
- [x] KINDERFREIBETRAG: Updated from 6,672€ (2025) to 6,828€ (2026)
- [x] TAX_BRACKETS: Verified current for 2026
- [x] All rates and thresholds verified

**Content:**

- [x] Updated year references: "2025" → "2026"
- [x] Updated meta tags
- [x] Updated FAQs with 2026 information

**Priority:** High

### Throughout 2026 Updates

**Scheduled Updates:**

- None currently scheduled

### Monitoring Requirements

- **Source:** Bundesfinanzministerium (BMF) tax updates
- **Frequency:** Annually (typically December for next year)

## Testing

### Test Cases

**Normal Cases:**

- Test 1: 50,000€ income, Steuerklasse I → Expected: ~5,500€ tax, ~11% effective rate
- Test 2: 100,000€ income, Steuerklasse I → Expected: ~25,000€ tax, ~25% effective rate
- Test 3: 30,000€ income, Steuerklasse I, 2 children → Expected: Lower tax due to Kinderfreibetrag

**Edge Cases:**

- Edge case 1: 0€ income → Expected: 0€ tax
- Edge case 2: 300,000€ income → Expected: Top rate (45%) applies
- Edge case 3: High deductions exceeding income → Expected: 0€ tax

### Code Analysis

**Key Functions Location:**

- Main component: `v2/js/einkommensteuer/calculator.js:1-1000+`
- Calculation functions: `v2/js/einkommensteuer/helpers.js:26-150`
- Export functions: `v2/js/einkommensteuer/export.js:1-300`
- Helper functions: `v2/js/einkommensteuer/utils.js:1-80`

**Constants Location:**

- Calculation constants: `v2/js/einkommensteuer/constants.js:15-118`
- Configuration constants: Same file

**Calculation Logic Flow:**

1. Step 1: Input received (debounced)
2. Step 2: Validation (check inputs)
3. Step 3: Calculate taxable income (helpers.js)
4. Step 4: Calculate progressive tax (helpers.js)
5. Step 5: Calculate surcharges (calculator.js)
6. Step 6: Format and display results (utils.js)

**State Management Flow:**

- Initialization: Default values set, email loaded from localStorage
- Updates: Reactive updates via Alpine.js on input change
- Dependencies: Constants, Utils, Helpers must be loaded first

**Event Handler Flow:**

- Input events: Debounced calculation triggers
- Calculation triggers: Automatic on input change
- Export triggers: Email collection if needed, then export generation

### Export Functionality

**Excel Export:**

- **Trigger:** Click "Excel" button in results section
- **Email Gating:** Required if email not in localStorage
- **Data Included:**
  - Inputs: Jahreseinkommen, Steuerklasse, Jahr, optional fields
  - Results: Einkommensteuer, Zu versteuerndes Einkommen, Effektiver Steuersatz, Grenzsteuersatz, Solidaritätszuschlag, Kirchensteuer, Nettoeinkommen
  - Breakdown: Tax calculation steps
- **Format:** XLSX format, multiple sheets (Summary, Details, Tax Breakdown)
- **File Name:** `einkommensteuer-berechnung-[timestamp].xlsx`
- **Function:** `exportExcel()` in `v2/js/einkommensteuer/export.js`

**PDF Export:**

- **Trigger:** Click "PDF" button in results section
- **Email Gating:** Required if email not in localStorage
- **Content Included:**
  - Header: Ordio branding
  - Summary: Key results
  - Inputs: All entered values
  - Results: Detailed breakdown
  - Footer: Date, disclaimer
- **Layout:** A4 portrait, branded styling
- **File Name:** `einkommensteuer-berechnung-[timestamp].pdf`
- **Function:** `exportPDF()` in `v2/js/einkommensteuer/export.js`

**Email Gating Process:**

- **When Required:** First export attempt
- **Modal Display:** Overlay modal with email input
- **Email Validation:** Format validation (email regex)
- **Storage:** localStorage key `einkommensteuer_export_email`
- **Pre-filling:** Email loaded from localStorage on page load
- **Error Handling:** Validation errors displayed in modal

### Sharing Functionality

**Share URL Generation:**

- Not currently implemented

### Results & Insights

**Result Display:**

- **Primary Results:** Einkommensteuer (large display), Zu versteuerndes Einkommen, Effektiver Steuersatz, Grenzsteuersatz
- **Secondary Results:** Solidaritätszuschlag, Kirchensteuer, Nettoeinkommen
- **Result Formatting:** Currency (€), percentages (%), German number format
- **Result Styling:** Blue accent for primary result, summary cards with icons

**Result Breakdowns:**

- **Tax Breakdown:** Shows calculation steps
- **Rate Breakdown:** Shows effective vs marginal rates
- **Surcharge Breakdown:** Shows solidarity and church tax separately

**Visualizations:**

- **Tax Rate Table:** Interactive table showing rates for income range
- **Comparison View:** Side-by-side comparison of two scenarios

**Insights Provided:**

- **Effective Tax Rate:** Shows overall tax burden
- **Marginal Tax Rate:** Shows rate on next Euro earned
- **Tax Optimization:** Comparison mode helps find optimal tax class

### Browser Testing Results

**Desktop Browsers:**

- **Chrome:** Tested, status: Working
- **Firefox:** Tested, status: Working
- **Safari:** Tested, status: Working
- **Edge:** Tested, status: Working

**Mobile Testing:**

- **iOS Safari:** Tested, status: Working, responsive layout
- **Android Chrome:** Tested, status: Working, responsive layout
- **Mobile UI Differences:** Stacked layout, touch-friendly inputs
- **Mobile Interactions:** Touch-optimized inputs, swipe-friendly tables

**Responsive Design:**

- **Desktop (>1024px):** Full layout, side-by-side comparison
- **Tablet (768px-1024px):** Adjusted grid, stacked cards
- **Mobile (<768px):** Single column, stacked inputs, full-width cards
- **Breakpoints:** 768px, 1024px

**Accessibility:**

- **Keyboard Navigation:** Full keyboard support, tab order logical
- **Screen Reader:** ARIA labels, role attributes, live regions
- **ARIA Labels:** All inputs labeled, results announced
- **Focus Management:** Focus moves to first input on mode switch
- **Color Contrast:** WCAG AA compliant

**Performance:**

- **Page Load Time:** <2s (optimized)
- **Calculation Speed:** <50ms (debounced)
- **Export Speed:** <1s for Excel, <2s for PDF
- **Large Data Handling:** Efficient for large income ranges in table mode

### Export Testing

- Excel: Tested, working, proper formatting
- PDF: Tested, working, proper layout

## Maintenance Notes

### Known Issues

- None currently documented

### Future Improvements

- Add URL parameter support for pre-filling inputs
- Add share functionality
- Add tax optimization suggestions
- Add historical tax rate comparison

### Related Tools

**Complementary Tools:**

- **[Brutto-Netto-Rechner](brutto-netto-rechner-documentation.md)** - Calculate monthly gross-to-net conversion

  - Use together when: Need both monthly net (Brutto-Netto) and annual tax (Einkommensteuer) calculations
  - Example workflow: Calculate monthly net → Calculate annual tax → Plan tax payments

- **[Minijob-Rechner](minijob-rechner-documentation.md)** - Calculate net salary for Minijob

  - Use together when: Comparing Minijob (no tax) vs regular employment (with tax)
  - Example workflow: Calculate Minijob net → Calculate regular employment tax → Compare options

- **[Midijob-Rechner](midijob-rechner-documentation.md)** - Calculate net salary for Midijob
  - Use together when: Comparing Midijob vs regular employment tax implications
  - Example workflow: Calculate Midijob net → Calculate regular employment tax → Compare

**Alternative Tools:**

- **[Brutto-Netto-Rechner](brutto-netto-rechner-documentation.md)** - Use instead when calculating monthly net salary
  - Use instead when: Need monthly net income calculation rather than annual tax

**Sequential Tools:**

- **[Brutto-Netto-Rechner](brutto-netto-rechner-documentation.md)** - Monthly net calculation
  - Use after: Calculating annual tax
  - Use before: Monthly budget planning

## References

### Official Sources

- **Bundesfinanzministerium:** https://www.bundesfinanzministerium.de (tax rates and brackets)
- **EStG §32a:** Official tax law for progressive tax calculation

### Documentation Files

- [Tool Documentation Template](../TOOL_DOCUMENTATION_TEMPLATE.md)
- [Tools Inventory](../../content/tools/TOOLS_INVENTORY.md)
- [Tools Pages Guide](../README.md)
