# Brutto-Netto-Rechner 2026 - Next Steps & Testing Guide

**Last Updated:** 2026-01-21

## Pre-Deployment Checklist

### Code Verification

- [x] All tax constants verified (Grundfreibetrag, Kinderfreibetrag, Kindergeld, Solidarity thresholds)
- [x] All social security rates verified (RV, AV, KV, PV)
- [x] All BBG limits verified (RV/AV, KV/PV)
- [x] Solidarity thresholds updated (20,350€/40,700€)
- [x] Minijob references updated (603€)
- [x] Arbeitslosenversicherung rate updated (1.3%)
- [x] All year references verified ("2026")
- [x] No console statements found
- [x] Calculation logic reviewed
- [x] Comprehensive test script created (51 tests, 100% pass rate)
- [x] Documentation updated

### Automated Testing

- [x] Run test script: `node v2/scripts/dev-helpers/test-brutto-netto-calculations.js`
- [x] All 51 tests passing (100% pass rate)
- [x] Constants verification tests passing
- [x] Calculation accuracy tests passing
- [x] Edge case tests passing

## Manual Testing Checklist

### 1. Basic Calculation Functionality

**Test Scenarios:**

- [ ] **Low Salary (1,000€/month)**
  - Tax Class: I
  - State: Berlin
  - Church Tax: No
  - Children: 0
  - Health Insurance: Statutory (1.5% addon)
  - Expected: Net salary should be positive, deductions should be reasonable
  - Verify: Income tax, social security contributions, net salary

- [ ] **Medium Salary (3,000€/month)**
  - Tax Class: I
  - State: Berlin
  - Church Tax: No
  - Children: 0
  - Health Insurance: Statutory (1.5% addon)
  - Expected: Net salary should be positive, income tax should be positive
  - Verify: All deductions calculated correctly

- [ ] **High Salary (5,000€/month)**
  - Tax Class: I
  - State: Berlin
  - Church Tax: No
  - Children: 0
  - Health Insurance: Statutory (1.5% addon)
  - Expected: Net salary should be positive, income tax should be significant
  - Verify: BBG application for social security

- [ ] **Very High Salary (10,000€/month)**
  - Tax Class: I
  - State: Berlin
  - Church Tax: No
  - Children: 0
  - Health Insurance: Statutory (1.5% addon)
  - Expected: Net salary should be positive, BBG should cap social security
  - Verify: Pension/unemployment capped at 8,450€, health/care capped at 5,812.50€

- [ ] **Yearly Input (36,000€/year)**
  - Tax Class: I
  - State: Berlin
  - Church Tax: No
  - Children: 0
  - Health Insurance: Statutory (1.5% addon)
  - Expected: Should convert to 3,000€/month and calculate correctly
  - Verify: Monthly calculations match monthly input

### 2. Tax Class Testing

**Test All 6 Tax Classes:**

- [ ] **Tax Class I (Single)**
  - Gross: 3,000€/month
  - Expected: Standard tax calculation
  - Verify: Tax multiplier = 1.0

- [ ] **Tax Class II (Single Parent)**
  - Gross: 3,000€/month
  - Children: 1
  - Expected: Lower tax than Class I
  - Verify: Tax multiplier = 0.85, net salary higher than Class I

- [ ] **Tax Class III (Married, Higher Earner)**
  - Gross: 3,000€/month
  - Expected: Lower tax than Class IV
  - Verify: Tax multiplier = 0.6, net salary higher than Class IV

- [ ] **Tax Class IV (Married, Equal Income)**
  - Gross: 3,000€/month
  - Expected: Standard tax calculation
  - Verify: Tax multiplier = 1.0

- [ ] **Tax Class V (Married, Lower Earner)**
  - Gross: 3,000€/month
  - Expected: Higher tax than Class IV
  - Verify: Tax multiplier = 1.4, net salary lower than Class IV

- [ ] **Tax Class VI (Second Job)**
  - Gross: 3,000€/month
  - Expected: Higher tax than Class I
  - Verify: Tax multiplier = 1.3, net salary lower than Class I

**Tax Class Comparison:**

- [ ] Compare Class I vs Class II (same gross, Class II should have lower tax)
- [ ] Compare Class III vs Class IV (same gross, Class III should have lower tax)
- [ ] Compare Class V vs Class IV (same gross, Class V should have higher tax)

### 3. State and Church Tax Testing

**Test All States:**

- [ ] **Bayern (8% church tax)**
  - Gross: 3,000€/month
  - Tax Class: I
  - Church Tax: Yes
  - Expected: Church tax = 8% of income tax
  - Verify: Church tax calculated correctly

- [ ] **Baden-Württemberg (8% church tax)**
  - Gross: 3,000€/month
  - Tax Class: I
  - Church Tax: Yes
  - Expected: Church tax = 8% of income tax
  - Verify: Church tax calculated correctly

- [ ] **Nordrhein-Westfalen (9% church tax)**
  - Gross: 3,000€/month
  - Tax Class: I
  - Church Tax: Yes
  - Expected: Church tax = 9% of income tax
  - Verify: Church tax calculated correctly

- [ ] **Berlin (No church tax)**
  - Gross: 3,000€/month
  - Tax Class: I
  - Church Tax: No
  - Expected: Church tax = 0
  - Verify: No church tax applied

- [ ] **Church Tax Comparison**
  - Compare Bayern vs NRW (same gross, Bayern should have lower church tax)
  - Compare with church tax vs without (same gross, with church tax should have lower net)

### 4. Children Testing

**Test Scenarios:**

- [ ] **No Children**
  - Gross: 3,000€/month
  - Children: 0
  - Expected: No child benefit, care insurance rate = 1.875%
  - Verify: Child benefit = 0, care insurance = 1.875%

- [ ] **One Child**
  - Gross: 3,000€/month
  - Children: 1
  - Child Age: 5
  - Expected: Child benefit = 259€/month, care insurance rate = 1.7%
  - Verify: Child benefit applied, care insurance rate correct

- [ ] **Multiple Children (3)**
  - Gross: 3,000€/month
  - Children: 3
  - Child Ages: 5, 8, 12
  - Expected: Child benefit = 777€/month (259€ × 3)
  - Verify: Child benefit calculated correctly

- [ ] **Care Insurance Discount (2+ children under 25)**
  - Gross: 3,000€/month
  - Children: 2
  - Child Ages: 5, 8
  - Expected: Care insurance discount applied (0.25% per child)
  - Verify: Care insurance rate < 1.7%

- [ ] **Care Insurance Discount (children over 25)**
  - Gross: 3,000€/month
  - Children: 2
  - Child Ages: 5, 26
  - Expected: No discount (only 1 child under 25)
  - Verify: Care insurance rate = 1.7% (no discount)

### 5. Social Security Testing

**BBG Application Tests:**

- [ ] **Below BBG RV/AV (3,000€/month)**
  - Expected: Pension/unemployment calculated on full amount
  - Verify: Pension = 3,000€ × 9.3%, Unemployment = 3,000€ × 1.3%

- [ ] **At BBG RV/AV (8,450€/month)**
  - Expected: Pension/unemployment calculated on full amount
  - Verify: Pension = 8,450€ × 9.3%, Unemployment = 8,450€ × 1.3%

- [ ] **Above BBG RV/AV (10,000€/month)**
  - Expected: Pension/unemployment capped at BBG
  - Verify: Pension = 8,450€ × 9.3%, Unemployment = 8,450€ × 1.3%

- [ ] **Below BBG KV/PV (3,000€/month)**
  - Expected: Health/care calculated on full amount
  - Verify: Health = 3,000€ × (7.3% + addon), Care = 3,000€ × rate

- [ ] **At BBG KV/PV (5,812.50€/month)**
  - Expected: Health/care calculated on full amount
  - Verify: Health = 5,812.50€ × (7.3% + addon), Care = 5,812.50€ × rate

- [ ] **Above BBG KV/PV (6,000€/month)**
  - Expected: Health/care capped at BBG
  - Verify: Health = 5,812.50€ × (7.3% + addon), Care = 5,812.50€ × rate

**Health Insurance Types:**

- [ ] **Statutory Health Insurance**
  - Gross: 3,000€/month
  - Health Insurance: Statutory
  - Addon: 1.5%
  - Expected: Health = 3,000€ × (7.3% + 1.5%)
  - Verify: Health insurance calculated correctly

- [ ] **Private Health Insurance**
  - Gross: 3,000€/month
  - Health Insurance: Private
  - Premium: 300€/month
  - Expected: Health = 300€ (fixed premium)
  - Verify: Health insurance = private premium

- [ ] **Voluntary Health Insurance**
  - Gross: 3,000€/month
  - Health Insurance: Voluntary
  - Addon: 1.5%
  - Expected: Health = 3,000€ × (7.3% + 1.5%)
  - Verify: Health insurance calculated correctly

**Pension/Unemployment Insurance:**

- [ ] **No Pension Insurance**
  - Gross: 3,000€/month
  - Pension Insurance: Not insured
  - Expected: Pension = 0
  - Verify: No pension contribution

- [ ] **No Unemployment Insurance**
  - Gross: 3,000€/month
  - Unemployment Insurance: Not insured
  - Expected: Unemployment = 0
  - Verify: No unemployment contribution

### 6. Solidarity Surcharge Testing

**Threshold Tests:**

- [ ] **Below Threshold (Low Income)**
  - Gross: 2,000€/month
  - Tax Class: I
  - Expected: Solidarity = 0 (income tax < 20,350€)
  - Verify: No solidarity surcharge

- [ ] **Above Threshold (High Income)**
  - Gross: 8,000€/month
  - Tax Class: I
  - Expected: Solidarity = 5.5% of income tax (if income tax > 20,350€)
  - Verify: Solidarity calculated correctly

- [ ] **Married Threshold (Tax Class 3)**
  - Gross: 8,000€/month
  - Tax Class: III
  - Expected: Solidarity threshold = 40,700€ (married)
  - Verify: Solidarity calculated based on married threshold

- [ ] **Married Threshold (Tax Class 4)**
  - Gross: 8,000€/month
  - Tax Class: IV
  - Expected: Solidarity threshold = 40,700€ (married)
  - Verify: Solidarity calculated based on married threshold

### 7. Tax Bracket Testing

**Boundary Tests:**

- [ ] **Below Grundfreibetrag (12,348€)**
  - Gross: 1,000€/month (12,000€/year)
  - Expected: Low or zero income tax
  - Verify: Tax calculation correct

- [ ] **At Grundfreibetrag Boundary**
  - Gross: 1,029€/month (12,348€/year)
  - Expected: Tax calculation at boundary
  - Verify: Tax calculation correct

- [ ] **Progressive Zone (Middle Income)**
  - Gross: 3,000€/month (36,000€/year)
  - Expected: Progressive tax calculation
  - Verify: Tax calculation correct

- [ ] **High Income (Above 68,429€)**
  - Gross: 6,000€/month (72,000€/year)
  - Expected: 42% marginal rate applies
  - Verify: Tax calculation correct

- [ ] **Very High Income (Above 277,825€)**
  - Gross: 25,000€/month (300,000€/year)
  - Expected: 45% marginal rate applies
  - Verify: Tax calculation correct

### 8. Edge Cases

**Edge Case Tests:**

- [ ] **Zero Salary**
  - Gross: 0€/month
  - Expected: Net = 0, all deductions = 0
  - Verify: No errors, all values = 0

- [ ] **Very High Salary (Above All BBG)**
  - Gross: 20,000€/month
  - Expected: All BBG limits applied, net salary positive
  - Verify: Pension/unemployment capped, health/care capped

- [ ] **Multiple Children (5)**
  - Gross: 3,000€/month
  - Children: 5
  - Child Ages: 2, 5, 8, 12, 15
  - Expected: Child benefit = 1,295€/month (259€ × 5)
  - Verify: Child benefit calculated correctly

- [ ] **Boundary at BBG RV/AV**
  - Gross: 8,450€/month (exactly at BBG)
  - Expected: Pension/unemployment calculated on full amount
  - Verify: No capping applied

- [ ] **Boundary at BBG KV/PV**
  - Gross: 5,812.50€/month (exactly at BBG)
  - Expected: Health/care calculated on full amount
  - Verify: No capping applied

- [ ] **Yearly Input Conversion**
  - Gross: 36,000€/year
  - Expected: Should convert to 3,000€/month
  - Verify: Monthly calculations match monthly input

### 9. Schema Validation

**Google Rich Results Test:**

- [ ] **WebPage Schema**
  - URL: https://www.ordio.com/tools/brutto-netto-rechner
  - Expected: WebPage schema validates
  - Verify: No errors in Google Rich Results Test

- [ ] **FAQPage Schema**
  - URL: https://www.ordio.com/tools/brutto-netto-rechner
  - Expected: FAQPage schema validates with all 9 FAQs
  - Verify: All FAQs appear in rich results

- [ ] **WebApplication Schema**
  - URL: https://www.ordio.com/tools/brutto-netto-rechner
  - Expected: WebApplication schema validates
  - Verify: Calculator information appears correctly

### 10. Content Verification

**Content Review:**

- [ ] **Year References**
  - Verify: No "2025" references remain (except historical context in comments)
  - Verify: All "2026" references are correct

- [ ] **Solidarity Thresholds**
  - Verify: All references show 20,350€/40,700€ (not 19,950€/39,900€)
  - Locations: FAQ Schema FAQ 1, FAQ Schema FAQ 6, FAQ Content FAQ 1, FAQ Content FAQ 6, Educational content

- [ ] **Minijob References**
  - Verify: All references show 603€ (not 520€)
  - Locations: FAQ Schema FAQ 8, FAQ Content FAQ 8

- [ ] **Arbeitslosenversicherung Rate**
  - Verify: All references show 1.3% (not 1.2%)
  - Location: FAQ Content FAQ 1

- [ ] **BBG References**
  - Verify: RV/AV BBG shows 8,450€/month
  - Verify: KV/PV BBG shows 5,812.50€/month

- [ ] **Examples**
  - Verify: All examples calculate correctly
  - Verify: Examples use realistic values
  - Verify: Examples match 2026 rates

### 11. Performance Testing

**Performance Checks:**

- [ ] **Page Load Time**
  - Expected: < 3 seconds
  - Verify: Page loads quickly

- [ ] **Calculation Speed**
  - Expected: < 100ms per calculation
  - Verify: Calculations are fast

- [ ] **No Console Errors**
  - Expected: No JavaScript errors
  - Verify: Browser console shows no errors

- [ ] **Responsive Design**
  - Expected: Works on mobile, tablet, desktop
  - Verify: Layout adapts correctly

### 12. Accessibility Testing

**Accessibility Checks:**

- [ ] **Keyboard Navigation**
  - Expected: All inputs accessible via keyboard
  - Verify: Tab order is logical

- [ ] **Screen Reader Compatibility**
  - Expected: All labels and descriptions readable
  - Verify: Screen reader can navigate calculator

- [ ] **Color Contrast**
  - Expected: Sufficient contrast for text
  - Verify: Text is readable

## Deployment Checklist

### Pre-Deployment

- [x] All automated tests passing
- [ ] All manual tests completed
- [ ] Schema validation passed
- [ ] Content review completed
- [ ] Performance checks passed
- [ ] Accessibility checks passed

### Deployment Steps

1. [ ] **Backup Current Version**
   - Create backup of `v2/pages/tools_bruttonettorechner.php`
   - Create backup of documentation files

2. [ ] **Deploy Code Changes**
   - Deploy updated `v2/pages/tools_bruttonettorechner.php`
   - Deploy test script `v2/scripts/dev-helpers/test-brutto-netto-calculations.js`

3. [ ] **Deploy Documentation**
   - Deploy updated documentation files
   - Deploy update summary
   - Deploy next steps guide

4. [ ] **Verify Deployment**
   - Check page loads correctly
   - Run automated tests on production
   - Verify schema markup on production

### Post-Deployment

- [ ] **Monitor for Errors**
  - Check error logs for 24 hours
  - Monitor user feedback
  - Check Google Search Console for schema errors

- [ ] **Verify Schema**
  - Re-run Google Rich Results Test
  - Verify FAQs appear in search results

- [ ] **Performance Monitoring**
  - Monitor page load times
  - Monitor calculation performance
  - Check for any performance regressions

## Verification Commands

### Run Automated Tests

```bash
node v2/scripts/dev-helpers/test-brutto-netto-calculations.js
```

Expected output:
```
Total Tests: 51
Passed: 51
Failed: 0
Success Rate: 100.0%
✅ All tests passed!
```

### Verify Constants

```bash
grep -n "solidarityThreshold" v2/pages/tools_bruttonettorechner.php
grep -n "Minijob" v2/pages/tools_bruttonettorechner.php
grep -n "unemploymentInsurance" v2/pages/tools_bruttonettorechner.php
```

### Verify No Console Statements

```bash
grep -r "console\.\(log\|error\|warn\)" v2/pages/tools_bruttonettorechner.php
```

Expected: No matches

### Verify Year References

```bash
grep -n "2025" v2/pages/tools_bruttonettorechner.php | grep -v "was.*2025" | grep -v "in 2025"
```

Expected: Only historical context references

## Notes

- All automated tests are passing (51/51 tests, 100% pass rate)
- All critical constants have been verified against official sources
- All content updates have been completed
- Schema markup has been verified and updated
- Comprehensive test coverage has been added

**Ready for deployment pending manual testing and schema validation.**
