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

# Calculate Extended IRR (XIRR)

> Calculate the Extended Internal Rate of Return for cash flows occurring at irregular intervals. Unlike standard IRR which assumes periodic cash flows, XIRR handles any date spacing. The dates array represents year fractions from the first cash flow date. Essential for evaluating real-world investments with irregular payment schedules such as private equity, venture capital, or any investment with non-standard cash flow timing. [Tier: STANDARD, Credits: 2]



## OpenAPI

````yaml api-specs/solver.json post /quantlib/solver/finance/xirr
openapi: 3.1.0
info:
  title: FinceptQuantLib API - Solver
  description: >-
    Solver module endpoints for FinceptQuantLib API. The Solver module (Basic
    Tier, 1 credit per request) provides advanced financial solvers including
    bond analytics (yield, duration, convexity), implied volatility
    calculations, spread computations (Z-spread, ASW, OAS), curve bootstrapping,
    interest rate conversions, and model calibration (Vasicek, CIR). Essential
    for fixed income analysis, derivatives pricing, and risk management.
  version: 3.0.0
  contact:
    name: Fincept API Support
    url: https://fincept.in
servers:
  - url: https://api.fincept.in
    description: Fincept API Production Server
security:
  - APIKeyHeader: []
tags:
  - name: quantlib-solver
    description: >-
      Advanced financial solvers for bond analytics, implied volatility, spread
      calculations, and model calibration
    x-displayName: Solver
paths:
  /quantlib/solver/finance/xirr:
    post:
      tags:
        - quantlib-solver
      summary: Calculate Extended IRR (XIRR)
      description: >-
        Calculate the Extended Internal Rate of Return for cash flows occurring
        at irregular intervals. Unlike standard IRR which assumes periodic cash
        flows, XIRR handles any date spacing. The dates array represents year
        fractions from the first cash flow date. Essential for evaluating
        real-world investments with irregular payment schedules such as private
        equity, venture capital, or any investment with non-standard cash flow
        timing. [Tier: STANDARD, Credits: 2]
      operationId: xirr
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - cashflows
                - dates
              properties:
                cashflows:
                  type: array
                  description: >-
                    Array of cash flows (negative for outflows, positive for
                    inflows)
                  items:
                    type: number
                  example:
                    - -100000
                    - 20000
                    - 30000
                    - 25000
                    - 60000
                dates:
                  type: array
                  description: Array of dates as year fractions from the first date
                  items:
                    type: number
                  example:
                    - 0
                    - 0.25
                    - 0.75
                    - 1.5
                    - 2
                guess:
                  type: number
                  description: Initial guess for the XIRR solver
                  default: 0.1
                  example: 0.1
            example:
              cashflows:
                - -100000
                - 20000
                - 30000
                - 25000
                - 60000
              dates:
                - 0
                - 0.25
                - 0.75
                - 1.5
                - 2
              guess: 0.1
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: object
                    properties:
                      xirr:
                        type: number
                        description: >-
                          The calculated extended internal rate of return as a
                          decimal
                        example: 0.1523
              example:
                success: true
                data:
                  xirr: 0.1523
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '402':
          $ref: '#/components/responses/InsufficientTierError'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: array
                    items:
                      type: object
      security:
        - APIKeyHeader: []
components:
  responses:
    UnauthorizedError:
      description: Authentication information is missing or invalid
      content:
        application/json:
          schema:
            type: object
            properties:
              detail:
                type: string
                example: Invalid API key
    InsufficientTierError:
      description: API tier insufficient for this endpoint
      content:
        application/json:
          schema:
            type: object
            properties:
              detail:
                type: string
                example: Endpoint requires Basic tier or higher
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        API key for authentication. Get your key at
        https://api.fincept.in/auth/register

````