# If-Converted Convertible-Debt Dilution

`D46-F02-A01` · Earnings and Per-Share Analytics → Basic and Diluted EPS · archetype `record-transform` · difficulty 3/5 · verification **verified**

Full page: https://docs.thefintechbuilder.com/earnings-and-per-share-analytics/basic-and-diluted-eps/if-converted-convertible-debt-dilution/
Agent skill: `npx skills add IslamBaraka90/Fintech-Algorithms-Library` — https://docs.thefintechbuilder.com/guides/agent-skill/

## Install and import

```bash
npm install fintech-algorithms
```

```ts
import { ifConvertedConvertibleDebtDilution } from "fintech-algorithms/earnings-and-per-share-analytics/basic-and-diluted-eps/if-converted-convertible-debt-dilution";
```

## Signature

```ts
ifConvertedConvertibleDebtDilution(input)
```

Applies the if-converted method to one convertible debt instrument: it time-weights the conversion shares over the days the instrument was outstanding inside the period, adds the numerator components back to earnings, and compares the resulting candidate against basic EPS to classify the instrument dilutive or antidilutive. All arithmetic runs in 50-significant-digit decimal with half-even rounding and the money figures come back as exact decimal strings. A contract failure is rethrown as an `Error` whose message begins `EPS calculation failed: `.

## Parameters

| Name | Type | Required | Notes |
| --- | --- | --- | --- |
| `input` | `{ period_start, period_end, continuing_operations_control_numerator, basic_weighted_average_shares, basic_components_complete, share_basis_restatement_complete, instrument: { issue_date, actual_conversion_date, lapse_redemption_or_extinguishment_date, fixed_ordinary_shares_on_conversion, holder_advantageous_terms_selected, expense_period_aligned, terms_restatement_complete, numerator_adjustment_components, is_final } }` | yes | `period_start` and `period_end` are `YYYY-MM-DD` dates with the end not before the start, and `basic_components_complete` and `share_basis_restatement_complete` must both be `true`. `continuing_operations_control_numerator` and `basic_weighted_average_shares` are canonical decimal strings, the share count strictly positive. `instrument` needs `holder_advantageous_terms_selected`, `expense_period_aligned` and `terms_restatement_complete` all `true`, an `issue_date`, a `fixed_ordinary_shares_on_conversion` decimal string, and a non-empty `numerator_adjustment_components` array whose `amount` strings are summed. `actual_conversion_date` and `lapse_redemption_or_extinguishment_date` are optional; when either is supplied it closes the outstanding window on the day before it. `is_final` defaults to `false`. There are no numeric tuning parameters. |

## Returns

`{ topic_id, state, basic_eps, numerator_adjustment, incremental_shares, incremental_eps, candidate_diluted_eps, classification, included, active_days, period_days, is_final }`

`state` is always `calculated`. `active_days` counts inclusive days from the later of `period_start` and `issue_date` to the earlier of `period_end` and the day before conversion or lapse, floored at zero, and `period_days` is the inclusive length of the reporting period; both are plain numbers. `incremental_shares` is the conversion share count scaled by `active_days / period_days`, and `incremental_eps` is `null` when those shares are zero. `classification` is `dilutive`, with `included` matching it, only when `candidate_diluted_eps` is strictly below `basic_eps`; otherwise it is `antidilutive`. All EPS and share figures are decimal strings.

## Errors

- When `basic_weighted_average_shares` is not strictly positive, for instance a value of `0` — throws Error
- When `period_end` is before `period_start`, any of the five input or instrument control flags is not `true`, `numerator_adjustment_components` is missing or empty, or a date is not a real `YYYY-MM-DD` value — throws Error

## Complexity

Time `O(n) in the number of numerator adjustment components`, space `O(1)`.

## Worked example

Captured by running this function on the input its own test provides. Real output of real code — but not asserted against a published figure.

### Input

`input`:

```json
{
  "period_start": "2025-01-01",
  "period_end": "2025-12-31",
  "continuing_operations_control_numerator": "30000000",
  "basic_weighted_average_shares": "10000000",
  "basic_components_complete": true,
  "share_basis_restatement_complete": true,
  "instrument": {
    "instrument_id": "SYN-CONV-1",
    "issue_date": "2025-04-01",
    "actual_conversion_date": null,
    "lapse_redemption_or_extinguishment_date": null,
    "fixed_ordinary_shares_on_conversion": "2000000",
    "holder_advantageous_terms_selected": true,
    "expense_period_aligned": true,
    "terms_restatement_complete": true,
    "numerator_adjustment_components": [
      {
        "component_id": "effective-interest-avoided",
        "amount": "1800000"
      },
      {
        "component_id": "related-tax-effect",
        "amount": "-450000"
      },
      {
        "component_id": "consequential-change",
        "amount": "-50000"
      }
    ],
    "is_final": true
  }
}
```

### Call

```ts
ifConvertedConvertibleDebtDilution(input)
```

### Returns

object with 12 fields: topic_id, state, basic_eps, numerator_adjustment, incremental_shares, incremental_eps, candidate_diluted_eps, classification, …

```json
{
  "topic_id": "D46-F02-A01",
  "state": "calculated",
  "basic_eps": "3",
  "numerator_adjustment": "1300000",
  "incremental_shares": "1506849.3150684931506849315068493150684931506849315",
  "incremental_eps": "0.86272727272727272727272727272727272727272727272728",
  "candidate_diluted_eps": "2.7201190476190476190476190476190476190476190476189",
  "classification": "dilutive",
  "included": true,
  "active_days": 275,
  "period_days": 365,
  "is_final": true
}
```

## Verification and provenance

Tier: **verified** (via E).

The worked example below is the figure published in this algorithm's article, replayed and asserted by the test suite on every build. The arithmetic cannot drift without the build failing.

Both tiers guarantee the signature. Full explanation: https://docs.thefintechbuilder.com/guides/verification/

Generated from the docs.json payload shipped inside fintech-algorithms@0.13.0.
The signature and parameter list are checked against the compiled implementation at build time,
so a description that contradicts the code fails the build rather than reaching this file.

## Links

- Article (how it works, step by step): https://thefintechbuilder.com/earnings-and-per-share-analytics/basic-and-diluted-eps/if-converted-convertible-debt-dilution/
- Implementation source: https://github.com/IslamBaraka90/Fintech-Algorithms-Library/blob/main/src/earnings-and-per-share-analytics/basic-and-diluted-eps/if-converted-convertible-debt-dilution/impl.ts
- Package on npm: https://www.npmjs.com/package/fintech-algorithms
- Domain index for agents: https://docs.thefintechbuilder.com/earnings-and-per-share-analytics/llms.txt
