# Stundenlohnrechner - Comprehensive Documentation

**Last Updated:** 2026-01-08

## Tool Overview

### Basic Information

- **Tool Name:** Stundenlohnrechner (Hourly Wage Calculator)
- **Slug:** `stundenlohnrechner`
- **URL:** `https://www.ordio.com/tools/stundenlohnrechner`
- **Status:** Available
- **Last Updated:** 2026-01-08

### Purpose

## Technical Implementation

### Files

- **PHP:** `v2/pages/tools_stundenlohnrechner.php`
- **JavaScript:** `/v2/js/tools-stundenlohn-calculator.js?v=<?php echo filemtime(__DIR__ . `
- **JavaScript:** `/v2/js/lead-capture-triggers.min.js?v=<?php echo filemtime(__DIR__ . `
Calculate hourly wage (Stundenlohn) from monthly or annual salary, or calculate monthly/annual salary from hourly rate. Includes comprehensive net salary calculation (Pro mode), minimum wage compliance check, Minijob limit check, automatic break calculation according to Arbeitszeitgesetz, and export functionality. Supports both simple (brutto only) and advanced (with netto) calculation modes.

### Use Cases

- **Employees:** Calculate hourly rate from monthly salary
- **Job Seekers:** Compare hourly rates across job offers
- **Employers:** Calculate hourly costs from monthly salaries
- **HR Professionals:** Verify minimum wage compliance
- **Salary Negotiators:** Convert between hourly and monthly/annual rates
- **Part-time Workers:** Calculate hourly rate for part-time positions

### Real-World Scenarios

**Scenario 1: Employee Comparing Job Offers**
- **User:** Job seeker evaluating multiple offers
- **Situation:** Offered €3,500/month at Company A, €22/hour at Company B, wants to compare
- **Goal:** Convert both to same format for fair comparison
- **Steps:**
  1. Enter €3,500 monthly salary → Calculate hourly rate
  2. Enter €22/hour → Calculate monthly/annual salary
  3. Compare net income for both (if Pro mode available)
  4. Consider working hours differences
  5. Make informed decision
- **Result:** Sees €3,500/month = ~€20/hour (40h/week), can compare with €22/hour offer
- **Related Tools:** [Brutto-Netto-Rechner](brutto-netto-rechner-documentation.md) (for net comparison), [Arbeitszeitrechner](arbeitszeitrechner-documentation.md) (for hours calculation)

**Scenario 2: HR Manager Verifying Minimum Wage Compliance**
- **User:** HR professional ensuring legal compliance
- **Situation:** Employee earns €2,800/month, works 40 hours/week, need to verify minimum wage
- **Goal:** Calculate hourly rate and verify it meets minimum wage requirements
- **Steps:**
  1. Enter €2,800 monthly salary
  2. Enter 40 hours/week
  3. Review calculated hourly rate
  4. Compare with current minimum wage (€12.82/hour in 2026)
  5. Verify compliance or adjust salary
- **Result:** Sees €2,800/173h = €16.18/hour, confirms compliance
- **Related Tools:** [Arbeitszeitrechner](arbeitszeitrechner-documentation.md) (for hours verification), [Zuschlagsrechner](zuschlagsrechner-documentation.md) (for shift surcharges)

**Scenario 3: Part-Time Worker Planning Income**
- **User:** Part-time worker planning monthly income
- **Situation:** Works 20 hours/week, wants to earn €1,500/month net
- **Goal:** Calculate required hourly rate to achieve target income
- **Steps:**
  1. Use reverse calculation (trial and error)
  2. Start with estimated hourly rate (e.g., €18/hour)
  3. Calculate monthly gross, then net
  4. Adjust hourly rate until net matches target
  5. Plan hours accordingly
- **Result:** Determines €20/hour needed for €1,500/month net (20h/week)
- **Related Tools:** [Brutto-Netto-Rechner](brutto-netto-rechner-documentation.md) (for net calculation), [Minijob-Rechner](minijob-rechner-documentation.md) (if considering Minijob)

**Scenario 4: Freelancer Setting Hourly Rate**
- **User:** Freelancer determining hourly rate for clients
- **Situation:** Needs €4,000/month net, works variable hours, wants to set hourly rate
- **Goal:** Calculate hourly rate that accounts for taxes and expenses
- **Steps:**
  1. Calculate gross needed for €4,000 net (using tax class)
  2. Estimate monthly hours (e.g., 160 hours)
  3. Calculate hourly rate: Gross ÷ Hours
  4. Add buffer for expenses and taxes
  5. Set client hourly rate
- **Result:** Determines €30/hour needed for €4,000/month net (160h/month)
- **Related Tools:** [Einkommensteuer-Rechner](einkommensteuer-rechner-documentation.md) (for tax planning), [Brutto-Netto-Rechner](brutto-netto-rechner-documentation.md) (for net calculation)

### Target Audience

- Employees
- Job seekers
- Employers
- HR professionals
- Salary negotiators
- Part-time workers

### Visual Description

**Hero Section:**

- Layout: Centered hero section with badge, headline, and description
- Badge: "Stundenlohnrechner" badge
- Headline: Large bold headline "Stundenlohnrechner 2026 – Stundenlohn (Brutto/Netto) berechnen" with blue accent
- Description: Paragraph explaining calculator features
- Background: Subtle dot pattern background

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

**Hero Section Screenshot:**
- Location: `docs/guides/tools-pages/screenshots/stundenlohnrechner-hero.png`
- Description: Full hero section showing badge, headline, description
- Dimensions: 1920x1080 (desktop), 375x667 (mobile)
- Shows: Complete above-fold content with visual styling

**Calculator Form Screenshot:**
- Location: `docs/guides/tools-pages/screenshots/stundenlohnrechner-form.png`
- Description: Calculator form showing Simple and Pro modes with input fields
- Dimensions: 1920x1080 (desktop)
- Shows: Mode selection, input fields (monthly/annual/hourly), calculate button

**Result Display Screenshot:**
- Location: `docs/guides/tools-pages/screenshots/stundenlohnrechner-results.png`
- Description: Results section showing hourly rate, net calculation, minimum wage check
- Dimensions: 1920x1080 (desktop)
- Shows: Primary hourly rate display, net income breakdown, compliance indicators

**Conversion Flow Diagram:**
- Location: `docs/guides/tools-pages/diagrams/stundenlohnrechner-conversion.svg`
- Description: Flow diagram showing conversion between hourly, monthly, and annual rates
- Format: SVG (vector) for scalability
- Shows: Input formats → Calculation → Output formats flow

**Mode Selection:**

- Layout: Tab switcher (Simple Mode / Pro Mode)
- Simple Mode Tab: "Einfach" (Simple - Brutto only)
- Pro Mode Tab: "Pro" (Advanced - with Netto calculation)
- Styling: Blue accent for active tab, gray for inactive

**Calculation Type Selection:**

- Layout: Radio button group (4 options)
- Options:
  - "Stundenlohn aus Monatslohn" (Hourly wage from monthly salary)
  - "Stundenlohn aus Jahreslohn" (Hourly wage from annual salary)
  - "Monatslohn aus Stundenlohn" (Monthly salary from hourly wage)
  - "Jahreslohn aus Stundenlohn" (Annual salary from hourly wage)
- Styling: Radio buttons styled as select boxes, blue accent for selected

**Simple Mode Form:**

- Layout: Centered single-column layout
- Input Fields:
  - Amount Input: Number input (€) with label
  - Weekly Hours: Number input (hours/week) with label
  - Work Days Per Week: Number input (1-7) with label
  - Apply Break Rules: Toggle (ArbZG break calculation)
- Calculate Button: Triggers calculation
- Styling: Blue accent color (#4D8EF3), rounded inputs, responsive grid

**Pro Mode Form:**

- Layout: Centered single-column layout with collapsible sections
- Basic Fields (Always Visible):
  - Amount Input: Number input (€)
  - Weekly Hours: Number input (hours/week)
  - Work Days Per Week: Number input (1-7)
  - Apply Break Rules: Toggle
- Advanced Settings Section (Collapsible):
  - Tax Class: Select (I-VI)
  - Federal State: Select (16 German states)
  - Church Tax: Toggle
  - Children Count: Number input (0-10)
  - Health Insurance Status: Radio (Standard/Reduced)
  - Health Insurance Additional Rate: Number input (%)
  - Solidarity Tax: Toggle
  - Special Payments: Number input (€/year)
- Calculate Button: Triggers calculation
- Styling: Blue accent color (#4D8EF3), gradient backgrounds for sections, rounded corners

**Result Display:**

- Layout: Below form, centered
- Summary Cards: Multiple cards showing:
  - Brutto-Stundenlohn (Brutto hourly wage)
  - Brutto-Monatslohn (Brutto monthly salary)
  - Brutto-Jahreslohn (Brutto annual salary)
  - Netto-Stundenlohn (Netto hourly wage) - Pro mode only
  - Netto-Monatslohn (Netto monthly salary) - Pro mode only
- Compliance Status: Visual indicators for:
  - Minimum Wage Check (OK/Warning/Error)
  - Minijob Limit Check (OK/Warning)
  - Working Time Check (OK/Warning)
- Detailed Breakdown (Pro Mode): Sections showing:
  - Social Insurance Breakdown (KV, PV, RV, ALV)
  - Tax Breakdown (Lohnsteuer, Kirchensteuer, Solidaritätszuschlag)
- Export Buttons: PDF and CSV export buttons
- Email Gating: Results gated behind email collection (first time only)
- Styling: Green accent for compliant, yellow for warnings, red for errors, responsive cards

### UI/UX Flow

**Initial Load:**

- Page loads with hero section visible
- Simple Mode selected by default
- Calculation type: "Stundenlohn aus Monatslohn" selected
- Default values: 4,105€ (average German salary), 40h/week, 5 days/week
- No results displayed initially
- Advanced settings collapsed (Pro mode)

**Simple Mode Flow:**

1. User selects calculation type (4 options)
2. User enters amount (monthly/annual salary or hourly rate)
3. User enters weekly hours
4. User optionally adjusts work days per week
5. User optionally enables break rules
6. User clicks "Berechnen" button
7. Calculation runs
8. If first calculation: Email modal appears
9. Email collected and stored in localStorage
10. Results display below form
11. User can export results (PDF/CSV)
12. User can modify inputs and recalculate
13. Subsequent calculations: No email prompt (email remembered)

**Pro Mode Flow:**

1. User switches to Pro Mode tab
2. User fills basic fields (same as Simple Mode)
3. User optionally expands advanced settings
4. User fills tax class, federal state, church tax, children, health insurance settings
5. User clicks "Berechnen" button
6. Calculation runs (brutto + netto)
7. If first calculation: Email modal appears
8. Email collected and stored in localStorage
9. Results display below form (brutto + netto + breakdown)
10. User can export results (PDF/CSV)
11. User can modify inputs and recalculate
12. Subsequent calculations: No email prompt (email remembered)

**Email Gating Flow:**

1. User calculates hourly wage (any mode)
2. If email not collected: Email modal appears
3. User enters email
4. Email validated
5. Email sent to HubSpot API
6. Email stored in localStorage
7. Results unlocked
8. Subsequent calculations: No email prompt

## Technical Documentation

### File Structure

- **PHP File:** `v2/pages/tools_stundenlohnrechner.php` (4,373+ lines)
- **JavaScript:** `v2/js/tools-stundenlohn-calculator.js` (1,761 lines, extracted)
- **CSS:** Uses shared `v2/css/tools-pages.css` + extensive inline styles

### Code Organization

**Alpine.js Component Structure:**

- Main component: `stundenlohnrechnerCalculator()` function (line 12 in JS file)
- Registered with: `Alpine.data('stundenlohnrechnerCalculator', stundenlohnrechnerCalculator)`
- External JS file: `v2/js/tools-stundenlohn-calculator.js`
- All logic in external JS file (extracted from PHP)

**State Management:**

- Alpine.js reactive state for all UI state
- localStorage for email collection and user preferences
- No server-side state

**Code Patterns:**

- Alpine.js reactive data properties
- On-demand calculation (button-triggered)
- Progressive disclosure (collapsible sections)
- Email gating for results
- Export functionality (PDF/CSV)
- Intelligent defaults based on calculation type

### Calculation Modes

**Mode 1: Simple Mode (Einfach)**

- **Visual Description:** Basic calculator with amount, hours, and work days inputs
- **Purpose:** Quick brutto calculation without netto details
- **Input Fields:**
  - `inputAmount` (number input): Amount (monthly/annual salary or hourly rate)
  - `weeklyHours` (number input): Weekly hours (0-60, step 0.1)
  - `workDaysPerWeek` (number input): Work days per week (1-7)
  - `applyBreakRules` (toggle): Apply ArbZG break rules
- **Output Fields:**
  - `results.summary.bruttoStundenlohn` (display): Brutto hourly wage
  - `results.summary.monatslohn` (display): Brutto monthly salary
  - `results.summary.jahreslohn` (display): Brutto annual salary
  - `results.compliance` (display): Compliance checks (minimum wage, minijob, working time)
- **Formula:**

  ```
  Switch calculationType:
    Case 'stundenlohn_from_monatslohn':
      Monthly Hours = weeklyHours × 4.3333
      If applyBreakRules:
        Daily Hours = weeklyHours / workDaysPerWeek
        Daily Minutes = Daily Hours × 60
        If Daily Minutes > 540 (>9h):
          Required Break = 45 minutes
        Else if Daily Minutes > 360 (>6h):
          Required Break = 30 minutes
        Else:
          Required Break = 0 minutes
        Effective Daily Hours = Daily Hours - (Required Break / 60)
        Effective Monthly Hours = Effective Daily Hours × workDaysPerWeek × 4.3333
      Else:
        Effective Monthly Hours = Monthly Hours
      Hourly Wage = monthlySalary / Effective Monthly Hours
      Monthly Salary = monthlySalary
      Yearly Salary = monthlySalary × 12

    Case 'stundenlohn_from_jahreslohn':
      Yearly Hours = weeklyHours × 52
      If applyBreakRules:
        Daily Hours = weeklyHours / workDaysPerWeek
        Daily Minutes = Daily Hours × 60
        If Daily Minutes > 540 (>9h):
          Required Break = 45 minutes
        Else if Daily Minutes > 360 (>6h):
          Required Break = 30 minutes
        Else:
          Required Break = 0 minutes
        Effective Daily Hours = Daily Hours - (Required Break / 60)
        Effective Yearly Hours = Effective Daily Hours × workDaysPerWeek × 52
      Else:
        Effective Yearly Hours = Yearly Hours
      Hourly Wage = yearlySalary / Effective Yearly Hours
      Monthly Salary = yearlySalary / 12
      Yearly Salary = yearlySalary

    Case 'monatslohn_from_stundenlohn':
      Monthly Hours = weeklyHours × 4.3333
      If applyBreakRules:
        Daily Hours = weeklyHours / workDaysPerWeek
        Daily Minutes = Daily Hours × 60
        If Daily Minutes > 540 (>9h):
          Required Break = 45 minutes
        Else if Daily Minutes > 360 (>6h):
          Required Break = 30 minutes
        Else:
          Required Break = 0 minutes
        Effective Daily Hours = Daily Hours - (Required Break / 60)
        Effective Monthly Hours = Effective Daily Hours × workDaysPerWeek × 4.3333
      Else:
        Effective Monthly Hours = Monthly Hours
      Monthly Salary = hourlyWage × Effective Monthly Hours
      Hourly Wage = hourlyWage
      Yearly Salary = Monthly Salary × 12

    Case 'jahreslohn_from_stundenlohn':
      Yearly Hours = weeklyHours × 52
      If applyBreakRules:
        Daily Hours = weeklyHours / workDaysPerWeek
        Daily Minutes = Daily Hours × 60
        If Daily Minutes > 540 (>9h):
          Required Break = 45 minutes
        Else if Daily Minutes > 360 (>6h):
          Required Break = 30 minutes
        Else:
          Required Break = 0 minutes
        Effective Daily Hours = Daily Hours - (Required Break / 60)
        Effective Yearly Hours = Effective Daily Hours × workDaysPerWeek × 52
      Else:
        Effective Yearly Hours = Yearly Hours
      Yearly Salary = hourlyWage × Effective Yearly Hours
      Monthly Salary = Yearly Salary / 12
      Hourly Wage = hourlyWage
  ```

- **Example Calculation:**

  ```
  Input: Calculation Type = "Stundenlohn aus Monatslohn", Monthly Salary = 4,105€, Weekly Hours = 40, Work Days = 5, Break Rules = Enabled
  Calculation:
    Daily Hours = 40 / 5 = 8 hours
    Daily Minutes = 8 × 60 = 480 minutes
    Since 480 > 360 (>6h) and 480 <= 540 (<=9h):
      Required Break = 30 minutes
    Effective Daily Hours = 8 - (30/60) = 7.5 hours
    Effective Monthly Hours = 7.5 × 5 × 4.3333 = 162.5 hours
    Hourly Wage = 4,105 / 162.5 = 25.26 €/hour
  Result: Hourly Wage 25.26€, Monthly Salary 4,105€, Yearly Salary 49,260€
  ```

- **Validation:**
  - Amount: > 0, valid number
  - Weekly Hours: 1-60 hours (validated automatically)
  - Work Days: 1-7 days
  - Error messages: Display in validation area

**Mode 2: Pro Mode (Pro)**

- **Visual Description:** Advanced calculator with netto calculation and detailed breakdown
- **Purpose:** Comprehensive calculation with netto salary, tax breakdown, and social insurance details
- **Input Fields:**
  - All Simple Mode fields plus:
  - `taxClass` (select): Tax class (I-VI)
  - `federalState` (select): German state (16 states)
  - `churchTax` (toggle): Church tax enabled
  - `childrenCount` (number input): Number of children (0-10)
  - `healthInsuranceStatus` (radio): Standard or Reduced
  - `healthInsuranceAdditionalRate` (number input): Additional rate (0-3%, step 0.1)
  - `solidarityTax` (toggle): Solidarity surcharge enabled
  - `specialPayments` (number input): Special payments per year (€)
- **Output Fields:**
  - All Simple Mode outputs plus:
  - `results.netto.nettoStundenlohn` (display): Netto hourly wage
  - `results.netto.nettoMonat` (display): Netto monthly salary
  - `results.netto.nettoJahr` (display): Netto annual salary
  - `results.netto.breakdown` (display): Detailed breakdown:
    - `kv` (display): Health insurance contribution
    - `pv` (display): Long-term care insurance contribution
    - `rv` (display): Pension insurance contribution
    - `alv` (display): Unemployment insurance contribution
    - `lohnsteuer` (display): Income tax
    - `kirchensteuer` (display): Church tax
    - `solidaritaetszuschlag` (display): Solidarity surcharge
- **Formula:**

  ```
  // First calculate brutto (same as Simple Mode)
  Brutto = [calculated from input based on calculationType]

  // Adjust brutto with special payments
  Adjusted Brutto = Brutto + (specialPayments / 12)

  // Calculate social insurance contributions (AN-Anteil)
  GKV Rate = healthInsuranceStatus === 'reduced' ? 7.3% : 14.6%
  GKV Additional Rate = healthInsuranceAdditionalRate
  GKV Total Rate = GKV Rate + GKV Additional Rate
  GKV AN Anteil = healthInsuranceStatus === 'reduced' ?
    (7.3 + GKV Additional Rate) :
    (14.6 + GKV Additional Rate) / 2

  KV Beitrag = min(Adjusted Brutto, GKV_BBG) × (GKV AN Anteil / 100)

  PV Rate = getPvSatz(childrenCount) // 2.4% (no children) to 0.8% (5+ children)
  PV Beitrag = min(Adjusted Brutto, GKV_BBG) × (PV Rate / 100)

  RV Beitrag = min(Adjusted Brutto, RV_BBG) × (RV_AN_ANTEIL / 100) // 9.3%

  ALV Beitrag = min(Adjusted Brutto, RV_BBG) × (ALV_AN_ANTEIL / 100) // 1.3%

  // Calculate income tax (simplified progressive calculation)
  Yearly Brutto = Adjusted Brutto × 12
  Tax Free Allowance = getTaxFreeAllowance(taxClass) // 0€ to 24,168€
  Taxable Income = max(0, Yearly Brutto - Tax Free Allowance)

  If Taxable Income <= 12,084:
    Tax = 0
  Else if Taxable Income <= 68,430:
    Progressive Rate = 14% + ((Taxable Income - 12,084) / (68,430 - 12,084)) × (42% - 14%)
    Tax = (Taxable Income - 12,084) × Progressive Rate
  Else if Taxable Income <= 277,826:
    Tax = (68,430 - 12,084) × 42% + (Taxable Income - 68,430) × 42%
  Else:
    Tax = (68,430 - 12,084) × 42% + (277,826 - 68,430) × 42% + (Taxable Income - 277,826) × 45%

  Monthly Tax = Tax / 12

  // Calculate church tax (if enabled)
  Church Tax Rate = (federalState === 'Baden-Württemberg' || federalState === 'Bayern') ? 8% : 9%
  Church Tax = Monthly Tax × Church Tax Rate

  // Calculate solidarity surcharge (if enabled)
  Yearly Tax = Monthly Tax × 12
  If Yearly Tax <= 19,450:
    Solidarity Surcharge = 0
  Else:
    Excess = Yearly Tax - 19,450
    Solidarity Surcharge = (Excess × 5.5%) / 12

  // Calculate netto
  Netto Monthly = Adjusted Brutto - KV Beitrag - PV Beitrag - RV Beitrag - ALV Beitrag - Monthly Tax - Church Tax - Solidarity Surcharge
  Netto Hourly = Netto Monthly / Effective Monthly Hours
  Netto Yearly = Netto Monthly × 12
  ```

- **Example Calculation:**

  ```
  Input: Calculation Type = "Stundenlohn aus Monatslohn", Monthly Salary = 4,105€, Weekly Hours = 40, Tax Class = I, Federal State = NRW, Church Tax = No, Children = 0, Health Insurance = Standard, Additional Rate = 2.5%, Solidarity Tax = Yes, Special Payments = 0
  Calculation:
    // Brutto calculation (same as Simple Mode)
    Hourly Wage = 25.26€/hour (from previous example)

    // Social insurance
    KV Beitrag = min(4,105, 5,512.50) × ((14.6 + 2.5) / 2) / 100 = 4,105 × 8.55% = 351.08€
    PV Beitrag = min(4,105, 5,512.50) × 2.4% = 98.52€
    RV Beitrag = min(4,105, 8,050) × 9.3% = 381.77€
    ALV Beitrag = min(4,105, 8,050) × 1.3% = 53.37€

    // Income tax
    Yearly Brutto = 4,105 × 12 = 49,260€
    Tax Free Allowance = 12,084€ (Tax Class I)
    Taxable Income = 49,260 - 12,084 = 37,176€
    Progressive Rate = 14% + ((37,176 - 12,084) / (68,430 - 12,084)) × (42% - 14%) = 14% + 0.45 × 28% = 26.6%
    Tax = (37,176 - 12,084) × 26.6% = 6,667.26€
    Monthly Tax = 6,667.26 / 12 = 555.61€

    // Church tax (not enabled)
    Church Tax = 0

    // Solidarity surcharge
    Yearly Tax = 555.61 × 12 = 6,667.32€
    Since 6,667.32 <= 19,450:
      Solidarity Surcharge = 0

    // Netto
    Netto Monthly = 4,105 - 351.08 - 98.52 - 381.77 - 53.37 - 555.61 - 0 - 0 = 2,664.65€
    Netto Hourly = 2,664.65 / 162.5 = 16.40€/hour
  Result: Brutto 25.26€/hour, Netto 16.40€/hour, Monthly Netto 2,664.65€
  ```

- **Validation:**
  - All Simple Mode validations plus:
  - Tax Class: Required (I-VI)
  - Federal State: Required (16 states)
  - Health Insurance Additional Rate: 0-3%
  - Children Count: 0-10
  - Special Payments: >= 0

### Compliance Checks

**Minimum Wage Check:**

- **Legal Basis:** Mindestlohngesetz (MiLoG)
- **2026 Minimum Wage:** ✅ 13.90€/hour (verified 2026-01-07)
- **Check:** Compare calculated hourly wage to minimum wage
- **Status:**
  - OK: If hourly wage >= minimum wage
  - Error: If hourly wage < minimum wage
- **Message:** Shows percentage difference above/below minimum wage

**Minijob Limit Check:**

- **Legal Basis:** Minijob regulations
- **2026 Minijob Limit:** ✅ 603€/month (verified 2026-01-07)
- **Check:** Compare monthly salary to Minijob limit
- **Status:**
  - OK: If monthly salary > Minijob limit
  - Warning: If monthly salary <= Minijob limit
- **Message:** Shows Minijob limit information

**Working Time Check:**

- **Legal Basis:** EU Working Time Directive (RL 2003/88/EG)
- **Maximum Weekly Hours:** 48 hours/week average
- **Check:** Compare weekly hours to maximum
- **Status:**
  - OK: If weekly hours <= 48
  - Warning: If weekly hours > 48
- **Message:** Shows EU directive information

### Constants and Thresholds

**2026 Values (TO UPDATE):**

- **Minimum Wage:** ✅ 13.90€/hour (2026, verified 2026-01-07)
- **Minijob Limit:** ✅ 603€/month (2026, verified 2026-01-07)
- **GKV BBG:** ✅ 5,812.50€/month (69,750€/year) (2026, verified 2026-01-07)
- **RV BBG:** ✅ 8,450€/month (101,400€/year) (2026, verified 2026-01-07)
- **GKV Rate:** 14.6% (typically stable)
- **GKV Additional Rate:** Average 2.5% (varies by insurance company)
- **PV Rate:** 2.4% (no children) to 0.8% (5+ children)
- **RV Rate:** 18.6% total, 9.3% employee share
- **ALV Rate:** 2.6% total, 1.3% employee share
- **Church Tax Rate:** 8% (BW/BY) or 9% (other states)
- **Solidarity Surcharge Rate:** 5.5% of income tax
- **Solidarity Surcharge Threshold:** 19,450€ yearly tax (typically 0€ for most people)
- **Monthly Hours Factor:** 4.3333 (52 weeks / 12 months)
- **Yearly Hours Factor:** 52 (weeks per year)

**Previous Values (for reference):**

- Minimum Wage 2026: 13.90€/hour
- Minimum Wage 2025: 12.82€/hour
- Minijob Limit 2026: 603€/month
- Minijob Limit 2025: 556€/month
- GKV BBG 2026: 5,812.50€/month
- GKV BBG 2025: 5,512.50€/month
- RV BBG 2026: 8,450€/month
- RV BBG 2026: 8,050€/month

### Validation Rules

- **Amount:** > 0, valid number format
- **Weekly Hours:** 1-60 hours (auto-corrected if outside range)
- **Work Days Per Week:** 1-7 days
- **Tax Class:** Required (I-VI)
- **Federal State:** Required (16 German states)
- **Health Insurance Additional Rate:** 0-3% (auto-corrected if outside range)
- **Children Count:** 0-10
- **Special Payments:** >= 0

### Edge Cases Handled

- Zero values: Shows 0 results
- Very high salaries: Calculates correctly
- Very low salaries: Shows minimum wage warning
- Break rules: Applies ArbZG break calculation
- Tax class variations: Handles all 6 tax classes
- Federal state variations: Handles all 16 states
- Church tax: Only applies if enabled
- Solidarity surcharge: Only applies if enabled and above threshold
- Special payments: Distributes across 12 months
- Health insurance variations: Standard vs reduced rate
- Children count: Affects PV rate (0-5+ children)

### Dependencies

- **External Libraries:**
  - jsPDF + html2canvas (PDF export, lazy-loaded)
- **APIs:** HubSpot Forms API v3 (email collection via `/v2/api/collect-lead.php`)
- **Alpine.js:** Used for reactive UI (version from base includes)
- **localStorage:** Email collection and user preferences
- **External JS File:** `v2/js/tools-stundenlohn-calculator.js` (1,761 lines)

## Functions & Methods

### Main Component Function

**Function:** `stundenlohnrechnerCalculator()`

- **Location:** `v2/js/tools-stundenlohn-calculator.js:12`
- **Purpose:** Main Alpine.js component for Stundenlohn calculator
- **Returns:** Alpine.js component object
- **Dependencies:** Alpine.js framework, jsPDF (lazy-loaded), html2canvas (lazy-loaded)
- **Side Effects:** Manages DOM state, triggers calculations, manages email collection, manages exports

### Calculation Functions

**Function:** `calculateStundenlohn()`

- **Location:** `v2/js/tools-stundenlohn-calculator.js:162`
- **Purpose:** Main calculation function
- **Returns:** void (sets component state)
- **Dependencies:** `validateWeeklyHours()`, `validateGkvRate()`, calculation type functions, `checkCompliance()`, `calculateNettoStundenlohn()`
- **Side Effects:** Updates results, triggers email modal if needed

**Function:** `calculateStundenlohnFromMonatslohn(monthlySalary, weeklyHours)`

- **Location:** `v2/js/tools-stundenlohn-calculator.js:235`
- **Purpose:** Calculate hourly wage from monthly salary
- **Returns:** Object (result with calculations)
- **Formula:** `Hourly Wage = Monthly Salary / Effective Monthly Hours`

**Function:** `calculateStundenlohnFromJahreslohn(yearlySalary, weeklyHours)`

- **Location:** `v2/js/tools-stundenlohn-calculator.js:297`
- **Purpose:** Calculate hourly wage from annual salary
- **Returns:** Object (result with calculations)
- **Formula:** `Hourly Wage = Yearly Salary / Effective Yearly Hours`

**Function:** `calculateMonatslohnFromStundenlohn(hourlyWage, weeklyHours)`

- **Location:** `v2/js/tools-stundenlohn-calculator.js:359`
- **Purpose:** Calculate monthly salary from hourly wage
- **Returns:** Object (result with calculations)
- **Formula:** `Monthly Salary = Hourly Wage × Effective Monthly Hours`

**Function:** `calculateJahreslohnFromStundenlohn(hourlyWage, weeklyHours)`

- **Location:** `v2/js/tools-stundenlohn-calculator.js:421`
- **Purpose:** Calculate annual salary from hourly wage
- **Returns:** Object (result with calculations)
- **Formula:** `Yearly Salary = Hourly Wage × Effective Yearly Hours`

**Function:** `calculateNettoStundenlohn(result)`

- **Location:** `v2/js/tools-stundenlohn-calculator.js:540`
- **Purpose:** Calculate netto hourly wage and monthly salary
- **Returns:** Object (netto results with breakdown)
- **Dependencies:** `getPvSatz()`, `calculateLohnsteuer()`, `calculateKirchensteuer()`, `calculateSolidaritaetszuschlag()`
- **Formula:** `Netto = Brutto - Social Insurance - Taxes`

**Function:** `calculateLohnsteuer(brutto)`

- **Location:** `v2/js/tools-stundenlohn-calculator.js:613`
- **Purpose:** Calculate income tax (simplified progressive calculation)
- **Returns:** Number (monthly tax)
- **Formula:** Progressive tax brackets (14% to 45%)

**Function:** `calculateKirchensteuer(lohnsteuer)`

- **Location:** `v2/js/tools-stundenlohn-calculator.js:660`
- **Purpose:** Calculate church tax
- **Returns:** Number (monthly church tax)
- **Formula:** `Church Tax = Income Tax × Church Tax Rate (8% or 9%)`

**Function:** `calculateSolidaritaetszuschlag(lohnsteuer)`

- **Location:** `v2/js/tools-stundenlohn-calculator.js:675`
- **Purpose:** Calculate solidarity surcharge
- **Returns:** Number (monthly solidarity surcharge)
- **Formula:** `Soli = max(0, (Yearly Tax - 19,450) × 5.5%) / 12`

**Function:** `getPvSatz()`

- **Location:** `v2/js/tools-stundenlohn-calculator.js:600`
- **Purpose:** Get PV rate based on children count
- **Returns:** Number (PV rate percentage)
- **Formula:** 2.4% (no children) to 0.8% (5+ children)

### Compliance Functions

**Function:** `checkCompliance(result)`

- **Location:** `v2/js/tools-stundenlohn-calculator.js:483`
- **Purpose:** Check compliance with legal requirements
- **Returns:** Object (compliance status)
- **Checks:** Minimum wage, Minijob limit, working time

### Validation Functions

**Function:** `validateWeeklyHours()`

- **Location:** `v2/js/tools-stundenlohn-calculator.js:789`
- **Purpose:** Validate and correct weekly hours to legal limits
- **Returns:** void (auto-corrects if needed)
- **Limits:** 1-60 hours/week (ArbZG allows up to 10h/day × 6 days)

**Function:** `validateGkvRate()`

- **Location:** `v2/js/tools-stundenlohn-calculator.js:830`
- **Purpose:** Validate and correct GKV additional rate
- **Returns:** void (auto-corrects if needed)
- **Limits:** 0-3% (realistic German health insurance rates)

**Function:** `validateInputs()`

- **Location:** `v2/js/tools-stundenlohn-calculator.js:701`
- **Purpose:** Comprehensive input validation
- **Returns:** Object (errors, warnings)

### Utility Functions

**Function:** `setIntelligentDefaults()`

- **Location:** `v2/js/tools-stundenlohn-calculator.js:725`
- **Purpose:** Set intelligent defaults based on calculation type
- **Returns:** void (sets component state)

**Function:** `formatCurrency(amount)`

- **Location:** `v2/js/tools-stundenlohn-calculator.js:691`
- **Purpose:** Format amount as currency (€)
- **Returns:** String (formatted currency)

**Function:** `formatNumber(number, decimals)`

- **Location:** `v2/js/tools-stundenlohn-calculator.js:907`
- **Purpose:** Format number with specified decimals
- **Returns:** String (formatted number)

**Function:** `calculateBreakTime()`

- **Location:** `v2/js/tools-stundenlohn-calculator.js:1686`
- **Purpose:** Calculate break time according to ArbZG
- **Returns:** Number (break minutes)
- **Formula:** 0min (<=6h), 30min (>6h and <=9h), 45min (>9h)

### Export Functions

**Function:** `exportPDF()`

- **Location:** `v2/js/tools-stundenlohn-calculator.js:1096`
- **Purpose:** Export results as PDF
- **Dependencies:** jsPDF, html2canvas libraries
- **Side Effects:** Downloads PDF file
- **Note:** ✅ Mentions "Deutsche Lohnberechnung 2026" (line 1261) and "Stundenlohnberechnung 2026" (line 1273) - needs 2026 update

**Function:** `exportCSV()`

- **Location:** `v2/js/tools-stundenlohn-calculator.js:1211`
- **Purpose:** Export results as CSV
- **Dependencies:** None (native JavaScript)
- **Side Effects:** Downloads CSV file
- **Note:** ✅ Mentions "Ordio Stundenlohnrechner 2026" (line 1438) and "Export erstellt mit Ordio Stundenlohnrechner 2026" (line 1679) - needs 2026 update

**Function:** `generatePDFHTML()`

- **Location:** `v2/js/tools-stundenlohn-calculator.js:1248`
- **Purpose:** Generate PDF HTML content
- **Returns:** String (HTML)
- **Note:** ✅ Mentions "2025" in multiple places - needs 2026 update

**Function:** `generateCSVContent()`

- **Location:** `v2/js/tools-stundenlohn-calculator.js:1416`
- **Purpose:** Generate CSV content
- **Returns:** String (CSV)
- **Note:** ✅ Mentions "2025" in multiple places - needs 2026 update

### Email Collection Functions

**Function:** `submitEmail()`

- **Location:** `v2/js/tools-stundenlohn-calculator.js:946`
- **Purpose:** Submit email to HubSpot API
- **Dependencies:** HubSpot Forms API v3, UTM tracking
- **Side Effects:** Stores email in localStorage, unlocks results

**Function:** `checkEmailStatus()`

- **Location:** `v2/js/tools-stundenlohn-calculator.js:1085`
- **Purpose:** Check if email was already collected
- **Dependencies:** localStorage
- **Side Effects:** Sets emailCollected flag if email found

## Formulas & Calculations

### Primary Formulas

**Stundenlohn from Monatslohn:**

```
Monthly Hours = weeklyHours × 4.3333

If applyBreakRules:
  Daily Hours = weeklyHours / workDaysPerWeek
  Daily Minutes = Daily Hours × 60
  If Daily Minutes > 540 (>9h):
    Required Break = 45 minutes
  Else if Daily Minutes > 360 (>6h):
    Required Break = 30 minutes
  Else:
    Required Break = 0 minutes
  Effective Daily Hours = Daily Hours - (Required Break / 60)
  Effective Monthly Hours = Effective Daily Hours × workDaysPerWeek × 4.3333
Else:
  Effective Monthly Hours = Monthly Hours

Hourly Wage = monthlySalary / Effective Monthly Hours
Monthly Salary = monthlySalary
Yearly Salary = monthlySalary × 12
```

**Stundenlohn from Jahreslohn:**

```
Yearly Hours = weeklyHours × 52

If applyBreakRules:
  Daily Hours = weeklyHours / workDaysPerWeek
  Daily Minutes = Daily Hours × 60
  If Daily Minutes > 540 (>9h):
    Required Break = 45 minutes
  Else if Daily Minutes > 360 (>6h):
    Required Break = 30 minutes
  Else:
    Required Break = 0 minutes
  Effective Daily Hours = Daily Hours - (Required Break / 60)
  Effective Yearly Hours = Effective Daily Hours × workDaysPerWeek × 52
Else:
  Effective Yearly Hours = Yearly Hours

Hourly Wage = yearlySalary / Effective Yearly Hours
Monthly Salary = yearlySalary / 12
Yearly Salary = yearlySalary
```

**Monatslohn from Stundenlohn:**

```
Monthly Hours = weeklyHours × 4.3333

If applyBreakRules:
  [Same break calculation as above]
  Effective Monthly Hours = Effective Daily Hours × workDaysPerWeek × 4.3333
Else:
  Effective Monthly Hours = Monthly Hours

Monthly Salary = hourlyWage × Effective Monthly Hours
Hourly Wage = hourlyWage
Yearly Salary = Monthly Salary × 12
```

**Jahreslohn from Stundenlohn:**

```
Yearly Hours = weeklyHours × 52

If applyBreakRules:
  [Same break calculation as above]
  Effective Yearly Hours = Effective Daily Hours × workDaysPerWeek × 52
Else:
  Effective Yearly Hours = Yearly Hours

Yearly Salary = hourlyWage × Effective Yearly Hours
Monthly Salary = Yearly Salary / 12
Hourly Wage = hourlyWage
```

**Netto Calculation (Pro Mode):**

```
Adjusted Brutto = Brutto + (specialPayments / 12)

// Social Insurance (AN-Anteil)
KV Beitrag = min(Adjusted Brutto, GKV_BBG) × (GKV AN Anteil / 100)
PV Beitrag = min(Adjusted Brutto, GKV_BBG) × (PV Rate / 100)
RV Beitrag = min(Adjusted Brutto, RV_BBG) × (RV AN Anteil / 100)
ALV Beitrag = min(Adjusted Brutto, RV_BBG) × (ALV AN Anteil / 100)

// Income Tax (simplified progressive)
Yearly Brutto = Adjusted Brutto × 12
Taxable Income = max(0, Yearly Brutto - Tax Free Allowance)

If Taxable Income <= 12,084:
  Tax = 0
Else if Taxable Income <= 68,430:
  Progressive Rate = 14% + ((Taxable Income - 12,084) / (68,430 - 12,084)) × (42% - 14%)
  Tax = (Taxable Income - 12,084) × Progressive Rate
Else if Taxable Income <= 277,826:
  Tax = (68,430 - 12,084) × 42% + (Taxable Income - 68,430) × 42%
Else:
  Tax = (68,430 - 12,084) × 42% + (277,826 - 68,430) × 42% + (Taxable Income - 277,826) × 45%

Monthly Tax = Tax / 12

// Church Tax (if enabled)
Church Tax = Monthly Tax × Church Tax Rate (8% or 9%)

// Solidarity Surcharge (if enabled)
Yearly Tax = Monthly Tax × 12
If Yearly Tax <= 19,450:
  Solidarity Surcharge = 0
Else:
  Solidarity Surcharge = ((Yearly Tax - 19,450) × 5.5%) / 12

// Netto
Netto Monthly = Adjusted Brutto - KV Beitrag - PV Beitrag - RV Beitrag - ALV Beitrag - Monthly Tax - Church Tax - Solidarity Surcharge
Netto Hourly = Netto Monthly / Effective Monthly Hours
Netto Yearly = Netto Monthly × 12
```

### Legal Basis

- **Mindestlohngesetz (MiLoG):** German Minimum Wage Act
- **Sozialgesetzbuch (SGB):** Social Security Code
  - SGB III: Unemployment insurance
  - SGB IV: Social security general
  - SGB V: Health insurance
  - SGB VI: Pension insurance
  - SGB XI: Long-term care insurance
- **Einkommensteuergesetz (EStG):** Income Tax Act
- **Arbeitszeitgesetz (ArbZG):** Working Time Act (break requirements)
- **EU Working Time Directive (RL 2003/88/EG):** Maximum 48 hours/week average

### Step-by-Step Calculation Examples

**Example 1: Simple Mode - Stundenlohn from Monatslohn**

- Input: Monthly Salary = 4,105€, Weekly Hours = 40, Work Days = 5, Break Rules = Enabled
- Step 1: Calculate daily hours: 40 / 5 = 8 hours
- Step 2: Calculate break: 8h > 6h → 30min break required
- Step 3: Calculate effective daily hours: 8 - 0.5 = 7.5 hours
- Step 4: Calculate effective monthly hours: 7.5 × 5 × 4.3333 = 162.5 hours
- Step 5: Calculate hourly wage: 4,105 / 162.5 = 25.26€/hour
- Result: Hourly Wage 25.26€, Monthly Salary 4,105€, Yearly Salary 49,260€

**Example 2: Pro Mode - Netto Calculation**

- Input: Same as Example 1, Tax Class = I, Federal State = NRW, Church Tax = No, Children = 0, Health Insurance = Standard, Additional Rate = 2.5%, Solidarity Tax = Yes
- Step 1: Calculate brutto (same as Example 1): 25.26€/hour
- Step 2: Calculate social insurance:
  - KV: 4,105 × 8.55% = 351.08€
  - PV: 4,105 × 2.4% = 98.52€
  - RV: 4,105 × 9.3% = 381.77€
  - ALV: 4,105 × 1.3% = 53.37€
- Step 3: Calculate income tax:
  - Yearly Brutto: 4,105 × 12 = 49,260€
  - Taxable Income: 49,260 - 12,084 = 37,176€
  - Progressive Rate: 14% + ((37,176 - 12,084) / (68,430 - 12,084)) × 28% = 26.6%
  - Tax: (37,176 - 12,084) × 26.6% = 6,667.26€
  - Monthly Tax: 6,667.26 / 12 = 555.61€
- Step 4: Calculate church tax: 0 (not enabled)
- Step 5: Calculate solidarity surcharge: 0 (yearly tax below threshold)
- Step 6: Calculate netto: 4,105 - 351.08 - 98.52 - 381.77 - 53.37 - 555.61 - 0 - 0 = 2,664.65€
- Step 7: Calculate netto hourly: 2,664.65 / 162.5 = 16.40€/hour
- Result: Brutto 25.26€/hour, Netto 16.40€/hour, Monthly Netto 2,664.65€

## Export Functionality

### Export Types

**PDF Export (.pdf):**

- Format: PDF format (A4)
- Content:
  - Ordio branding header
  - Calculation details (type, mode, inputs)
  - Results section (brutto/netto)
  - Detailed breakdown (Pro mode only: social insurance, taxes)
  - Compliance section (minimum wage, minijob, working time)
- Filename: `Ordio_Stundenlohnrechner_[Date].pdf`
- Libraries: jsPDF, html2canvas
- Note: ✅ Mentions "Deutsche Lohnberechnung 2026" and "Stundenlohnberechnung 2026" - needs 2026 update

**CSV Export (.csv):**

- Format: CSV format (comma-separated)
- Content:
  - Input parameters
  - Calculation results (brutto/netto)
  - Detailed breakdown (Pro mode only)
  - Compliance checks
- Filename: `Ordio_Stundenlohnrechner_[Date].csv`
- Library: Native JavaScript
- Note: ✅ Mentions "Ordio Stundenlohnrechner 2026" - needs 2026 update

### Email Gating

- **First Export:** Email modal appears (any mode)
- **Email Collection:** Email stored in localStorage
- **Subsequent Exports:** No email prompt (email remembered)
- **Email Validation:** Basic email format validation
- **HubSpot Integration:** Email sent to HubSpot Forms API v3

### Sharing

- **Export PDF/CSV:** For sharing calculation results
- **Copy Results:** Not available (export only)

## Results & Insights

### Result Display

**Simple Mode Results:**

- Brutto-Stundenlohn: Large number display
- Brutto-Monatslohn: Number display
- Brutto-Jahreslohn: Number display
- Compliance Status: Visual indicators (OK/Warning/Error)

**Pro Mode Results:**

- All Simple Mode results plus:
- Netto-Stundenlohn: Large number display
- Netto-Monatslohn: Number display
- Netto-Jahr: Number display
- Detailed Breakdown:
  - Social Insurance: KV, PV, RV, ALV contributions
  - Taxes: Lohnsteuer, Kirchensteuer, Solidaritätszuschlag
- Compliance Status: Visual indicators (OK/Warning/Error)

**Compliance Status:**

- Visual Indicator: Green (OK), Yellow (Warning), Red (Error)
- Status Text: "Mindestlohn eingehalten" / "Mindestlohn unterschritten" / "Minijob-Grenze erreicht" / "Wöchentliche Arbeitszeit über 48h"

**Email Gating:**

- Results gated behind email collection (first time only)
- Placeholder values shown until email collected
- Email modal appears on first calculation
- Email stored in localStorage for session persistence

### Smart Features

- **Intelligent Defaults:** Default values change based on calculation type
- **Auto-validation:** Weekly hours and GKV rate auto-corrected if outside limits
- **Break Rules:** Optional ArbZG break calculation
- **Compliance Checks:** Real-time minimum wage, Minijob, and working time checks
- **Export Functionality:** PDF and CSV export
- **Email Gating:** Email collection for lead generation
- **User Preferences:** Save settings in localStorage

## Browser Testing Results

### Desktop Browsers

**Chrome (Latest):**

- Status: ✅ Fully functional
- Issues: None
- Notes: All features working correctly, PDF export works

**Firefox (Latest):**

- Status: ✅ Fully functional
- Issues: None
- Notes: All features working correctly

**Safari (Latest):**

- Status: ✅ Fully functional
- Issues: None
- Notes: All features working correctly

**Edge (Latest):**

- Status: ✅ Fully functional
- Issues: None
- Notes: All features working correctly

### Mobile Testing

**iOS Safari:**

- Status: ✅ Functional
- Device: iPhone (tested)
- Issues: Minor UI adjustments on small screens
- Notes: Form adapts to mobile, table scrolls horizontally

**Android Chrome:**

- Status: ✅ Functional
- Device: Android (tested)
- Issues: None
- Notes: Touch interactions work correctly

**Mobile UI Differences:**

- Form: Single column on mobile
- Result cards: Stack vertically on mobile
- Export buttons: Stack vertically on mobile
- Advanced settings: Collapsible sections work well on mobile

### Responsive Design

**Desktop (>1024px):**

- Layout: Centered single-column
- Form Grid: Multi-column grids for inputs
- Result Cards: Grid layout (3 columns)
- Table: Full width

**Tablet (768px-1024px):**

- Layout: Centered single-column
- Form Grid: 2-column grids
- Result Cards: 2-column grid
- Table: Full width

**Mobile (<768px):**

- Layout: Full-width single-column
- Form Grid: Single column
- Result Cards: Single column
- Table: Horizontal scroll

**Breakpoints:**

- Mobile: < 768px
- Tablet: 768px - 1024px
- Desktop: > 1024px

### Accessibility

**Keyboard Navigation:**

- Tab navigation works through all form fields
- Enter to calculate
- Focus indicators visible

**Screen Reader:**

- Form labels properly associated
- Results announced after calculation
- Table has proper roles
- Compliance status announced

**ARIA Labels:**

- Input fields have labels
- Buttons have descriptive text
- Table has proper roles
- Collapsible sections have proper ARIA attributes

## Code Analysis

### Key Functions Location

- Main component: `v2/js/tools-stundenlohn-calculator.js:12`
- Main calculation: `v2/js/tools-stundenlohn-calculator.js:162`
- Calculation type functions: `v2/js/tools-stundenlohn-calculator.js:235+`
- Netto calculation: `v2/js/tools-stundenlohn-calculator.js:540`
- Compliance checks: `v2/js/tools-stundenlohn-calculator.js:483`
- Export functions: `v2/js/tools-stundenlohn-calculator.js:1096+`
- Email collection: `v2/js/tools-stundenlohn-calculator.js:946`

### Constants Location

- Rates data: `RATES_2026` object (updated to 2026)
- Tax free allowances: Hardcoded in `calculateLohnsteuer()` (line 620)
- Tax brackets: Hardcoded in `calculateLohnsteuer()` (line 637)
- PV rates: `PFLEGEVERSICHERUNG` object (line 65)
- Church tax rates: `KIRCHENSTEUER` object (line 84)

### Calculation Logic Flow

1. **User Input:**

   - User selects calculation type
   - User enters amount, weekly hours, work days
   - User optionally enables break rules
   - User optionally switches to Pro mode and fills advanced settings

2. **Validation:**

   - Weekly hours validated (1-60 hours, auto-corrected)
   - GKV rate validated (0-3%, auto-corrected if Pro mode)
   - Inputs validated (amount > 0, etc.)

3. **Calculation:**

   - Calculate brutto based on calculation type
   - Apply break rules if enabled
   - Check compliance (minimum wage, Minijob, working time)
   - If Pro mode: Calculate netto (social insurance + taxes)
   - Generate summary for export

4. **Display:**

   - Results updated in component state
   - UI updates automatically (Alpine.js reactivity)
   - Email modal appears if first calculation
   - Results displayed after email collection

5. **Export:**
   - PDF: Generate HTML, convert to canvas, create PDF
   - CSV: Generate CSV string, download file

## Content Documentation

### Hero Section

- **H1:** "Stundenlohnrechner 2026 – Stundenlohn (Brutto/Netto) berechnen" (✅ Already "2026")
- **Description:** "Berechne jetzt deinen Stundenlohn 2026 – aus Monats-/Jahresgehalt oder pro Stunde. Mit Mindestlohn- & Minijob-Check, Netto-Option und Pausen-Logik." (✅ Already "2026")

### Educational Content Sections

1. **Calculation Types**

   - Explanation of 4 calculation types
   - When to use each type

2. **Break Rules**

   - ArbZG break requirements explained
   - How break rules affect calculation

3. **Netto Calculation**

   - Social insurance explained
   - Tax calculation explained
   - Breakdown components explained

4. **Compliance Checks**

   - Minimum wage check explained
   - Minijob limit check explained
   - Working time check explained

### FAQ Section

- **Total FAQs:** ~10 FAQs
- **FAQ Topics:**
  - Calculation: 4 FAQs
  - Netto: 3 FAQs
  - Compliance: 3 FAQs

**Sample FAQs:**

1. "Wie berechne ich meinen Stundenlohn aus dem Monatsgehalt?"
2. "Was ist der Unterschied zwischen Brutto- und Netto-Stundenlohn?"
3. "Wie wird der Mindestlohn geprüft?"

### Meta Tags

- **Title:** "Stundenlohnrechner 2026 – Stundenlohn (Brutto/Netto) berechnen" (✅ Already "2026")
- **Description:** "Berechne jetzt deinen Stundenlohn 2026 – aus Monats-/Jahresgehalt oder pro Stunde. Mit Mindestlohn- & Minijob-Check, Netto-Option und Pausen-Logik." (✅ Already "2026")

### Schema Markup

- **WebApplication schema:** Yes
- **FAQPage schema:** Yes
- **HowTo schema:** Yes
- **BreadcrumbList schema:** Yes

### Internal Linking

- Links to: Related salary/wage tools
- Link count: 2-3 internal links

## 2026 Update Requirements

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

**Constants/Values:**

- ✅ **Minimum Wage:** Updated `RATES_2026.MINDESTLOHN` to 13.90€/hour - COMPLETE
- ✅ **Minijob Limit:** Updated `RATES_2026.MINIJOB_LIMIT` to 603€ - COMPLETE
- ✅ **GKV BBG:** Update `RATES_2025.GKV_BBG` from 5,512.50€ to 5,812.50€/month (line 62) - ✅ CRITICAL UPDATE NEEDED
- ✅ **RV BBG:** Update `RATES_2025.RV_BBG` from 8,050€ to 8,450€/month (line 77) - ✅ CRITICAL UPDATE NEEDED
- ✅ **Object Name:** Consider renaming `RATES_2025` to `RATES_2026` or update values while keeping name
- ✅ Social security rates: Typically stable (verify unchanged)

**Content:**

- ✅ Meta tags: Already "2026"
- ✅ PDF Export: Update "Deutsche Lohnberechnung 2026" to "2026" (line 1261)
- ✅ PDF Export: Update "Stundenlohnberechnung 2026" to "2026" (line 1273)
- ✅ CSV Export: Update "Ordio Stundenlohnrechner 2026" to "2026" (line 1438, 1679)
- ✅ FAQs: Review and update minimum wage references (12.82€ → 13.90€)
- ✅ Educational sections: Review for "2025" → "2026" updates

**Priority:** 🔴 HIGH (Legal compliance risk - minimum wage and BBG values affect calculations)

### Throughout 2026 Updates

**Scheduled Updates:**

- **Minimum Wage:** Update annually (typically January 1)
- **BBG Values:** Update annually (typically January 1)
- **Social Security Rates:** Monitor for changes (typically stable)

### Monitoring Requirements

- **Bundesministerium für Arbeit und Soziales:** Check for minimum wage updates (annual, January 1)
- **Deutsche Rentenversicherung:** Check for BBG updates (annual, January 1)
- **GKV-Spitzenverband:** Check for GKV BBG updates (annual, January 1)
- **Frequency:** Annually (January) or when laws change
- **Source:** Official announcements, BMAS, DRV, GKV-SV

## Testing

### Test Cases

**Simple Mode:**

- Test 1: Monthly Salary 4,105€, 40h/week → Expected: ~25.26€/hour (with breaks)
- Test 2: Hourly Wage 13.90€, 40h/week → Expected: ~2,408€/month
- Test 3: Minimum wage check → Expected: Warning if below 13.90€
- Test 4: Break rules → Expected: Adjusted calculation

**Pro Mode:**

- Test 1: Same as Simple Mode + Netto calculation → Expected: Correct netto
- Test 2: Different tax classes → Expected: Different netto
- Test 3: Church tax enabled → Expected: Church tax applied
- Test 4: Special payments → Expected: Distributed across 12 months

**Edge Cases:**

- Edge case 1: 0€ salary → Expected: 0€/hour
- Edge case 2: Very high salary → Expected: Calculates correctly
- Edge case 3: Very low salary → Expected: Minimum wage warning
- Edge case 4: Break rules applied → Expected: Adjusted calculation
- Edge case 5: All tax classes → Expected: Correct calculations
- Edge case 6: All federal states → Expected: Correct church tax rates

### Browser Testing

- Chrome: ✅ Tested, working
- Firefox: ✅ Tested, working
- Safari: ✅ Tested, working
- Mobile: ✅ Tested, working

### Export Testing

- PDF: ✅ Functional (jsPDF + html2canvas)
- CSV: ✅ Functional (native JavaScript)

## Content Structure

### Hero Section

- **H1 Title:** To be documented
- **Meta Description:** Berechne jetzt deinen Stundenlohn 2026 – aus Monats-/Jahresgehalt oder pro Stunde. Mit Mindestlohn- 

### FAQs

- **Total FAQs:** 6
- Q: Wie berechne ich meinen Stundenlohn 2026 aus dem Monatsgehalt?...
- Q: Wie berechne ich den Netto-Stundenlohn (Brutto-Netto) im Jahr 2026?...
- Q: Mindestlohn 2026: Welcher Wert gilt – und liege ich darunter?...

## Maintenance Notes

### Known Issues

- Minimum wage shows 2026 value (12.82€) - needs 2026 update (13.90€)
- BBG values show 2026 values - need 2026 updates
- PDF/CSV exports mention "2025" - need 2026 updates
- External JS file makes updates easier (good structure)

### Future Improvements

- Add more tax calculation accuracy (official BMF formulas)
- Add comparison mode (multiple scenarios)
- Add historical data visualization
- Improve compliance violation explanations
- Add more export formats (Excel)

### Related Tools

**Complementary Tools:**

- **[Brutto-Netto-Rechner](brutto-netto-rechner-documentation.md)** - Calculate monthly net salary
  - Use together when: Need both hourly rate and monthly net income calculations
  - Example workflow: Calculate hourly rate → Calculate monthly net → Compare job offers

- **[Minijob-Rechner](minijob-rechner-documentation.md)** - Calculate net salary for Minijob
  - Use together when: Converting Minijob monthly salary to hourly rate
  - Example workflow: Enter Minijob monthly salary → Calculate hourly rate → Verify compliance

- **[Midijob-Rechner](midijob-rechner-documentation.md)** - Calculate net salary for Midijob
  - Use together when: Converting Midijob monthly salary to hourly rate
  - Example workflow: Enter Midijob monthly salary → Calculate hourly rate → Compare options

- **[Arbeitszeitrechner](arbeitszeitrechner-documentation.md)** - Calculate working hours
  - Use together when: Need both hourly rate and working hours calculations
  - Example workflow: Calculate hourly rate → Calculate total hours → Total compensation

**Alternative Tools:**

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

**Sequential Tools:**

- **[Zuschlagsrechner](zuschlagsrechner-documentation.md)** - Calculate shift surcharges
  - Use after: Calculating base hourly rate
  - Use before: Total compensation calculation with surcharges

## References

### Official Sources

- **Mindestlohngesetz (MiLoG):** German Minimum Wage Act
- **Sozialgesetzbuch (SGB):** Social Security Code
- **Einkommensteuergesetz (EStG):** Income Tax Act
- **Arbeitszeitgesetz (ArbZG):** Working Time Act
- **EU Working Time Directive (RL 2003/88/EG):** European regulations

### Documentation Files

- `BROWSER_TESTING_FRAMEWORK.md`: Browser testing guidelines
- `CODE_ANALYSIS_FRAMEWORK.md`: Code analysis guidelines
- `TOOL_DOCUMENTATION_TEMPLATE.md`: Documentation template
