# Basic EPS

`D46-F01-A08` · Earnings and Per-Share Analytics → Earnings and Share Foundations · archetype `record-transform` · difficulty 2/5 · verification **contract**

Full page: https://docs.thefintechbuilder.com/earnings-and-per-share-analytics/earnings-and-share-foundations/basic-eps/
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 { calculateBasicEps } from "fintech-algorithms/earnings-and-per-share-analytics/earnings-and-share-foundations/basic-eps";
```

## Signature

```ts
calculateBasicEps(input)
```

Basic earnings per share: profit attributable to ordinary shareholders over the weighted average shares outstanding. Both halves are subtler than they look — the numerator is after preference dividends, and the denominator is time-weighted, not a period-end count.

## Parameters

| Name | Type | Required | Notes |
| --- | --- | --- | --- |
| `input` | `BasicEpsInput` | yes | `profit_loss_attributable_to_owners` and `preference_dividend_adjustments` form the numerator; the share records form the time-weighted denominator. `as_of` bounds which filings are usable, and `statement_scope` distinguishes consolidated from separate statements. |

## Returns

`{ metric, entity_id, period_start, period_end, accounting_framework, statement_scope, … }`

The EPS figure with both components and the weighting applied, so a disagreement with a published number can be localised to numerator or denominator.

## Errors

- When the weighted average share count is zero or negative — reported as a status rather than thrown

## Complexity

Time `O(share events)`, 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
{
  "entity_id": "EXAMPLE-PLC",
  "period_start": "2025-01-01",
  "period_end": "2025-12-31",
  "as_of": "2026-02-20T16:30:00Z",
  "accounting_framework": "IFRS",
  "statement_scope": "consolidated",
  "currency": "USD",
  "profit_loss_attributable_to_owners": "12500",
  "preference_dividend_adjustment": "500",
  "participating_security_allocation": "0",
  "other_numerator_adjustment": "0",
  "earnings_scale": "1000",
  "weighted_average_ordinary_shares": "6000",
  "share_scale": "1000"
}
```

Showing 14 of 21 fields.

### Call

```ts
calculateBasicEps(input)
```

### Returns

object with 19 fields: metric, entity_id, period_start, period_end, as_of, accounting_framework, statement_scope, currency, …

```json
{
  "metric": "basic_earnings_per_ordinary_share",
  "entity_id": "EXAMPLE-PLC",
  "period_start": "2025-01-01",
  "period_end": "2025-12-31",
  "as_of": "2026-02-20T16:30:00Z",
  "accounting_framework": "IFRS",
  "statement_scope": "consolidated",
  "currency": "USD",
  "numerator_policy": "Profit attributable to owners less after-tax preference dividends.",
  "denominator_policy": "IAS 33 weighted-average ordinary shares, retrospectively restated.",
  "earnings_available_to_ordinary_shareholders": "12000000",
  "weighted_average_ordinary_shares_base": "6000000",
  "basic_eps": "2.0000",
  "decimal_places": 4
}
```

Showing 14 of 19 fields.

## Verification and provenance

Tier: **contract**.

The module loads, the entry point is callable and its declared signature matches the compiled code. The example below is real captured output, but no independently published figure asserts the numbers.

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.1.
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/earnings-and-share-foundations/basic-eps/
- Implementation source: https://github.com/IslamBaraka90/Fintech-Algorithms-Library/blob/main/src/earnings-and-per-share-analytics/earnings-and-share-foundations/basic-eps/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
