> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wizflow.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Calculation

# Calculation Feature

## Overview

Wizflow connects your digital customer flows with real-time financial calculation capabilities. In a single interaction, customers can model outcomes such as home loan affordability across interest rate scenarios, explore long-term savings plans, or receive automated financial recommendations - all based on your institution's own rules.

The Calculation feature compares two financial scenarios:

* **Baseline**: The customer's current financial situation
* **Recommendation**: An optimized scenario with suggested improvements

The system forecasts year by year until age 88, showing how different financial decisions impact their future across pensions, mortgages, insurance, savings, and investments.

## Why Use This Feature

<CardGroup cols={2}>
  <Card title="Interactive Financial Modeling" icon="sliders">
    Let customers explore "what if" scenarios in real-time during onboarding or advisory conversations
  </Card>

  <Card title="Comprehensive Planning" icon="chart-network">
    See the complete financial picture - how mortgage refinancing affects retirement savings, or how pension contributions impact emergency funds
  </Card>

  <Card title="Actionable Recommendations" icon="lightbulb">
    Generate specific, quantified suggestions based on your institution's rules and the customer's actual situation
  </Card>

  <Card title="Multi-Market Support" icon="globe">
    Built-in tax and benefits calculations for Denmark and UK markets
  </Card>
</CardGroup>

## Common Use Cases

### 1. Mortgage Refinancing Advisory

**Customer question**: "Should I refinance my mortgage?"

**What you can show**:

* Monthly payment difference (before and after)
* Total interest savings over loan lifetime
* Break-even point including all refinancing costs
* Impact on home equity at retirement

**Required inputs**:

* Customer birth year
* Current house value
* Existing loan details (balance, interest rate, remaining years)
* New mortgage offer terms

**Key outputs**:

* Loan-to-value ratio comparison
* Average monthly net installment delta
* Total refinancing fees
* House equity at retirement

<Accordion title="View detailed inputs">
  **Minimum required:**

  * Primary person birth year
  * House value

  **For meaningful recommendations:**

  * Existing loan principal
  * Remaining tenure
  * Current interest rate
  * Contribution fee rate
  * Refinancing costs (redemption fee, bond price)
  * New mortgage terms (interest rate, contribution fee, bond price)
</Accordion>

***

### 2. Retirement Planning & Pension Optimization

**Customer question**: "Am I saving enough for retirement?"

**What you can show**:

* Projected retirement income vs current income (coverage ratio)
* Monthly disposable income throughout retirement
* Impact of increasing/decreasing contributions
* Tax-optimized contribution strategies

**Required inputs**:

* Customer birth year
* Current monthly income
* Existing pension savings and contributions
* Desired retirement age

**Key outputs**:

* Coverage ratio (target: 75%)
* Average monthly disposable income during retirement
* Net pension depot at retirement
* Year-by-year retirement income projections

<Accordion title="View detailed inputs">
  **Minimum required:**

  * Primary person birth year
  * Income amount and payment frequency

  **For meaningful recommendations:**

  * Existing pension policy initial value
  * Current contribution amount
  * Payout type (lump sum, annuity, life annuity)
  * Target coverage ratio or desired retirement income
</Accordion>

***

### 3. First-Time Homebuyer Affordability

**Customer question**: "Can I afford this house while maintaining my other financial goals?"

**What you can show**:

* Impact on emergency savings
* Effect on retirement planning
* Long-term affordability analysis
* Required emergency fund adjustments

**Required inputs**:

* Income and current savings
* Target house price
* Mortgage terms being considered
* Existing pension contributions

**Key outputs**:

* Cash-to-salary ratio
* Impact on retirement savings
* Long-term wealth projections
* Recommended emergency fund size

***

### 4. Life Event Protection (Insurance)

**Customer question**: "Am I properly protected if something unexpected happens?"

**What you can show**:

* Household income replacement scenarios
* Coverage adequacy analysis
* Premium vs benefit trade-offs
* Impact on family's financial security

**Required inputs**:

* Customer birth year
* Household income
* Existing insurance coverages
* Financial obligations (mortgage, dependents)

**Key outputs**:

* Coverage ratio for different life events
* Disposable income projections (disability/death scenarios)
* Recommended coverage levels

## How It Works

### 1. Data Collection

The calculation trigger collects customer inputs from your workflow responses — income, existing financial products, goals, and household information.

### 2. Scenario Analysis

The system builds two complete financial projections:

* **Baseline**: Current trajectory with no changes
* **Recommendation**: Optimized plan based on your institution's rules

### 3. Results Generation

Returns three types of outputs:

* **Financial Figures**: Key numbers (wealth at retirement, coverage ratios, loan-to-value ratios)
* **Delta Figures**: Differences between scenarios (monthly payment changes, retirement income improvements)
* **Time-Series Data**: Year-by-year projections for visualization

## Financial Areas Covered

<AccordionGroup>
  <Accordion title="Pension" icon="piggy-bank">
    **What it calculates:**

    * Saving and down-saving phases for each person
    * Disposable income during retirement
    * Coverage ratio (retirement income vs current income)
    * Tax and public benefit implications

    **Recommendation options:**

    * Target coverage ratio (default: 75%)
    * Target retirement income
    * Specific contribution amounts (gross or net)

    **Supports:**

    * Individual and household-level pension planning
    * Country-specific tax calculations (Denmark and UK)
    * Multiple payout types (lump sum, annuity, life annuity)
  </Accordion>

  <Accordion title="Insurance & Risk Coverage" icon="shield-heart">
    **What it calculates:**

    * Financial impact of disability or death events
    * Coverage adequacy vs household needs
    * Premium and payout projections

    **Recommendation options:**

    * Target coverage ratio (default: 75%)
    * Target disposable income in event scenarios
    * Specific premium amounts

    **Supports:**

    * Death and disability coverage analysis
    * Integration with pension policies
    * Country-specific tax calculations (Denmark and UK)
  </Accordion>

  <Accordion title="House & Mortgage" icon="house">
    **What it calculates:**

    * Refinancing scenarios with all costs
    * Home equity projections
    * Loan-to-value ratio over time
    * Interest-only period optimization

    **Supports:**

    * Multiple houses and mortgages
    * Fixed rate loans, bond-based mortgages, bank loans
    * Complete refinancing cost analysis (redemption fees, foundation fees, bond prices)

    **Recommendation options:**

    * Target loan-to-value ratio at retirement (default: 50%)
    * Optimized use of interest-only periods
    * Custom mortgage terms
  </Accordion>

  <Accordion title="Emergency Savings" icon="vault">
    **What it calculates:**

    * Recommended emergency fund size
    * Timeline to reach savings target
    * Cash-to-salary ratio

    **Recommendation options:**

    * Target cash-to-salary ratio (default: 125% of monthly gross)
    * Specific emergency fund amount
    * Custom savings plan (initial + monthly contributions)

    **Supports:**

    * Multiple cash accounts
    * Automatic rebalancing from other liquid assets
  </Accordion>

  <Accordion title="Liquid Assets & Investments" icon="chart-line">
    **What it calculates:**

    * Investment portfolio projections
    * After-tax returns (mark-to-market, realization tax)
    * Net cash flow impact from all financial decisions

    **How it works:**
    Functions as a "liquidity account" — surpluses and deficits from other areas (pension increases, mortgage changes) flow through here, showing real impact on available cash.

    **Supports:**

    * Multiple asset types (stocks, bonds, cash)
    * Different tax regimes (primarily Danish market)
    * Dreams and one-off expenses
  </Accordion>

  <Accordion title="Business Ownership" icon="briefcase">
    **What it calculates:**

    * Company equity projections
    * Dividend payout strategies
    * Tax optimization for incorporated companies

    **Supports:**

    * Personal and incorporated companies
    * EBITDA-based projections

    **Recommendation options:**

    * Maintain current structure
    * Top-tax optimized dividends (incorporated companies)
    * Custom dividend amounts
  </Accordion>

  <Accordion title="Dreams & Goals" icon="sparkles">
    **What it supports:**

    * One-off major expenses (home purchase, travel, education)
    * Impact analysis on overall financial plan

    **How it works:**
    Dreams are treated as planned withdrawals at specified dates. The system automatically shows if goals create cash flow challenges and helps adjust the plan accordingly.
  </Accordion>
</AccordionGroup>

## Configuration

### Basic Setup

<Steps>
  <Step title="Set Calculation Country">
    Choose Denmark or UK (determines tax rules and public benefits)
  </Step>

  <Step title="Collect Customer Age">
    Birth year is required; pension age and expected death age are optional (defaults: 65-68 for pension, 85-90 for death)
  </Step>

  <Step title="Add Municipality (Denmark only)">
    Municipality ID for accurate tax calculations
  </Step>

  <Step title="Map Workflow Variables">
    Connect your workflow response variables to calculation inputs
  </Step>
</Steps>

### Optional: Spouse/Partner

Include spouse information (same fields as primary) for household-level planning with coordinated retirement timing.

### Recommendation Settings

Configure default targets for your institution:

| Parameter                        | Purpose                            | Default |
| -------------------------------- | ---------------------------------- | ------- |
| **Loan Ratio**                   | Target loan-to-value at retirement | 50%     |
| **Pension Recommendation Ratio** | Target coverage ratio              | 75%     |

These can be customized per customer based on their specific situation and goals.

## Understanding Results

### Financial Figures

Key outcome metrics that summarize the customer's financial situation:

* Wealth at retirement
* Coverage ratios
* Loan-to-value ratios
* Average disposable income during retirement
* Emergency savings adequacy

### Delta Figures

Show the specific impact of recommendations:

* Monthly payment changes
* Retirement income differences
* Wealth accumulation improvements
* Interest savings
* Tax implications

### Time-Series Data (Statements)

Year-by-year projections available for visualization:

* Income and expense trends
* Asset and liability values over time
* Tax payments
* Pension contributions and payouts
* House equity development

### Messages & Alerts

Proactive warnings about potential issues:

* Negative account balances
* Income shortfalls in retirement
* High debt ratios
* Unexpected tax situations

## Displaying Results in Wizflow

<CardGroup cols={3}>
  <Card title="Message Entity" icon="message">
    Display findings and recommendations in conversational format
  </Card>

  <Card title="Chart Entity" icon="chart-line">
    Visualize projections and trends over time
  </Card>

  <Card title="Comparison Chart" icon="chart-column">
    Side-by-side baseline vs recommendation scenarios
  </Card>
</CardGroup>

## System Capabilities

<CardGroup cols={2}>
  <Card title="Deterministic Results" icon="equals">
    Identical inputs always produce identical results for consistent customer experiences
  </Card>

  <Card title="Country-Specific Rules" icon="scale-balanced">
    Built-in tax and benefit calculations for Denmark and UK
  </Card>

  <Card title="Household Planning" icon="users">
    Supports individuals and couples with coordinated financial planning
  </Card>

  <Card title="Long-Term Forecasting" icon="clock">
    Projects until age 88 for comprehensive life planning
  </Card>
</CardGroup>

## Best Practices

<CardGroup cols={2}>
  <Card title="Start Focused" icon="bullseye">
    Begin with the most relevant financial area for your customer (mortgage, pension, or emergency savings), then expand to additional areas
  </Card>

  <Card title="Test Scenarios" icon="flask">
    Use sample data to verify calculations and fine-tune your workflow before customer-facing deployment
  </Card>

  <Card title="Validate Key Inputs" icon="circle-check">
    Confirm critical assumptions (retirement age, growth rates, tax status) with customers to ensure meaningful projections
  </Card>

  <Card title="Emphasize Changes" icon="arrow-right-arrow-left">
    Focus on what improves and by how much — delta figures often resonate more than absolute numbers
  </Card>
</CardGroup>

## Getting Started

### Quick Start Checklist

<Steps>
  <Step title="Choose Your Use Case">
    Select from mortgage refinancing, retirement planning, homebuyer affordability, or insurance optimization
  </Step>

  <Step title="Identify Required Inputs">
    Review the detailed input requirements for your chosen use case (see accordions above)
  </Step>

  <Step title="Configure Your Workflow">
    Set up your Wizflow conversation to collect necessary customer information
  </Step>

  <Step title="Map Variables">
    Connect workflow responses to calculation inputs
  </Step>

  <Step title="Test with Sample Data">
    Run test calculations to verify results and refine your customer experience
  </Step>

  <Step title="Design Result Presentation">
    Choose how to display results using message, chart, or comparison entities
  </Step>
</Steps>

## Example Workflow: Mortgage Refinancing

Here's a simple workflow structure for mortgage refinancing advisory:

1. **Collect basic information**
   * Age and household size
   * Current house value
   * Existing mortgage details

2. **Present refinancing offer**
   * New mortgage terms
   * Interest rate options

3. **Trigger calculation**
   * Compare baseline vs recommended scenario
   * Generate projections

4. **Display results**
   * Monthly payment comparison (chart)
   * Total savings over loan term (key figure)
   * Break-even analysis (message)
   * Long-term equity impact (chart)

5. **Gather decision**
   * Proceed with refinancing
   * Explore alternative terms
   * Decline and maintain current mortgage

## Technical Details

The calculation engine provides deterministic results, ensuring consistent customer experiences. Forecasts extend until age 88 by default, offering comprehensive long-term planning insights. The system automatically manages time context including optimization periods, retirement timing, and life events.

All calculations are performed with annual granularity, focusing on long-term financial planning rather than short-term budgeting.

## Support

For questions about implementing the calculation feature in your Wizflow workflows, contact our team.
