{
  "x402Version": 2,
  "id": 72387,
  "slug": "saylorinnovations-api-finance-npv-irr",
  "resource": "https://saylorinnovations.com/api/finance/npv-irr",
  "description": "NPV, IRR, profitability index, payback and discounted payback for a cash-flow series with an accept or reject decision and NPV at several discount rates",
  "type": "http",
  "serviceName": "Saylor Innovations Data Desk",
  "mimeType": "application/json",
  "resourceType": "API",
  "accepts": [
    {
      "scheme": "exact",
      "network": "eip155:8453",
      "payTo": "0xA2A8dF0f7CaaBEa4e120a2568118f141569fc8aa",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "amount": "10000",
      "amountUsd": 0.01,
      "maxTimeoutSeconds": 120
    },
    {
      "scheme": "exact",
      "network": "eip155:137",
      "payTo": "0xA2A8dF0f7CaaBEa4e120a2568118f141569fc8aa",
      "asset": "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",
      "amount": "10000",
      "amountUsd": 0.01,
      "maxTimeoutSeconds": 120
    },
    {
      "scheme": "exact",
      "network": "eip155:42161",
      "payTo": "0xA2A8dF0f7CaaBEa4e120a2568118f141569fc8aa",
      "asset": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
      "amount": "10000",
      "amountUsd": 0.01,
      "maxTimeoutSeconds": 120
    },
    {
      "scheme": "exact",
      "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
      "payTo": "7LSjfrJf8fNsB8VA9u7N3WEn25smQLpob3SvyUvXacy7",
      "asset": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
      "amount": "10000",
      "amountUsd": 0.01,
      "maxTimeoutSeconds": 120
    },
    {
      "scheme": "exact",
      "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
      "payTo": "7LSjfrJf8fNsB8VA9u7N3WEn25smQLpob3SvyUvXacy7",
      "asset": "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB",
      "amount": "10000",
      "amountUsd": 0.01,
      "maxTimeoutSeconds": 120
    },
    {
      "scheme": "exact",
      "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
      "payTo": "7LSjfrJf8fNsB8VA9u7N3WEn25smQLpob3SvyUvXacy7",
      "asset": "So11111111111111111111111111111111111111112",
      "amount": "95830",
      "amountUsd": 0.01,
      "maxTimeoutSeconds": 120
    }
  ],
  "outputSchema": {
    "type": "object",
    "properties": {
      "periods": {
        "type": "number",
        "description": "Number of periods in the cash flow series"
      },
      "discount_rate": {
        "type": "number",
        "description": "Discount rate"
      },
      "npv": {
        "type": "number",
        "description": "Net present value at the discount rate"
      },
      "irr": {
        "type": [
          "number",
          "null"
        ],
        "description": "Internal rate of return per period"
      },
      "irr_percent": {
        "type": [
          "number",
          "null"
        ],
        "description": "Irr, as a percentage"
      },
      "decision": {
        "type": "string",
        "description": "Accept or reject verdict from NPV"
      },
      "profitability_index": {
        "type": [
          "number",
          "null"
        ],
        "description": "Profitability index"
      },
      "payback_periods": {
        "type": [
          "number",
          "null"
        ],
        "description": "Payback periods"
      },
      "discounted_payback_periods": {
        "type": [
          "number",
          "null"
        ],
        "description": "Discounted payback periods"
      },
      "npv_at_rates": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "npv": {
              "description": "Net present value at that rate",
              "type": [
                "number",
                "null"
              ]
            },
            "rate": {
              "description": "Rate"
            }
          }
        },
        "description": "Npv at rates"
      },
      "note": {
        "type": "string",
        "description": "Caveat or context for reading the result"
      },
      "source": {
        "type": "string",
        "description": "Data source the values come from"
      },
      "cashflows": {
        "description": "The cash flows that were evaluated",
        "type": [
          "array",
          "null"
        ]
      },
      "total_undiscounted_return": {
        "type": [
          "number",
          "null"
        ],
        "description": "Total undiscounted return"
      }
    },
    "required": [
      "periods",
      "npv",
      "decision"
    ]
  },
  "extensions": {
    "bazaar": {
      "info": {
        "input": {
          "type": "http",
          "method": "GET",
          "queryParams": {
            "cashflows": "-1000,300,400,500,200",
            "rate": "0.08"
          }
        },
        "output": {
          "type": "json",
          "example": {
            "periods": 4,
            "discount_rate": 0.08,
            "npv": 164.6354,
            "irr": 0.153221,
            "irr_percent": 15.322,
            "decision": "accept: positive NPV at the discount rate",
            "profitability_index": 1.1646,
            "payback_periods": 2.6,
            "discounted_payback_periods": 2.96,
            "total_undiscounted_return": 400,
            "cashflows": [
              -1000,
              300,
              400,
              500,
              200
            ],
            "npv_at_rates": [
              {
                "rate": 0,
                "npv": 400
              },
              {
                "rate": 0.05,
                "npv": 244.99
              },
              {
                "rate": 0.1,
                "npv": 115.57
              },
              {
                "rate": 0.15,
                "npv": 6.44
              },
              {
                "rate": 0.2,
                "npv": -86.42
              }
            ],
            "note": "Cash flows are assumed to arrive at equal period intervals starting with period 0 (the outlay). IRR is the discount rate that makes NPV zero; with sign changes in the middle of the series more than one IRR can exist and this returns the first bracketed root.",
            "source": "discounted cash flow"
          }
        }
      },
      "schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "input": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "http"
              },
              "method": {
                "type": "string",
                "enum": [
                  "GET"
                ]
              },
              "queryParams": {
                "type": "object",
                "properties": {
                  "cashflows": {
                    "type": "string",
                    "description": "Comma-separated cash flows, initial outlay first (negative)"
                  },
                  "rate": {
                    "type": "string",
                    "description": "optional discount rate decimal, default 0.10"
                  }
                },
                "required": [
                  "cashflows"
                ]
              }
            },
            "required": [
              "type",
              "method"
            ],
            "additionalProperties": false
          },
          "output": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "json"
              },
              "example": {
                "type": "object",
                "properties": {
                  "periods": {
                    "type": "number",
                    "description": "Number of periods in the cash flow series"
                  },
                  "discount_rate": {
                    "type": "number",
                    "description": "Discount rate"
                  },
                  "npv": {
                    "type": "number",
                    "description": "Net present value at the discount rate"
                  },
                  "irr": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "description": "Internal rate of return per period"
                  },
                  "irr_percent": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "description": "Irr, as a percentage"
                  },
                  "decision": {
                    "type": "string",
                    "description": "Accept or reject verdict from NPV"
                  },
                  "profitability_index": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "description": "Profitability index"
                  },
                  "payback_periods": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "description": "Payback periods"
                  },
                  "discounted_payback_periods": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "description": "Discounted payback periods"
                  },
                  "npv_at_rates": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "npv": {
                          "description": "Net present value at that rate",
                          "type": [
                            "number",
                            "null"
                          ]
                        },
                        "rate": {
                          "description": "Rate"
                        }
                      }
                    },
                    "description": "Npv at rates"
                  },
                  "note": {
                    "type": "string",
                    "description": "Caveat or context for reading the result"
                  },
                  "source": {
                    "type": "string",
                    "description": "Data source the values come from"
                  },
                  "cashflows": {
                    "description": "The cash flows that were evaluated",
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "total_undiscounted_return": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "description": "Total undiscounted return"
                  }
                },
                "required": [
                  "periods",
                  "npv",
                  "decision"
                ]
              }
            },
            "required": [
              "type"
            ]
          }
        },
        "required": [
          "input"
        ]
      }
    }
  },
  "tags": [
    "npv and irr calculator",
    "net present value of cash flows",
    "internal rate of return",
    "payback period calculation",
    "should i accept this investment"
  ],
  "sourceHost": "saylorinnovations.com",
  "lastUpdated": "2026-10-26T22:14:01.940Z",
  "quality": {},
  "metadata": {
    "serviceName": "Saylor Innovations Data Desk",
    "method": "GET",
    "mimeType": "application/json",
    "inputSchema": {
      "type": "object",
      "properties": {
        "cashflows": {
          "type": "string",
          "description": "Comma-separated cash flows, initial outlay first (negative)"
        },
        "rate": {
          "type": "string",
          "description": "optional discount rate decimal, default 0.10"
        }
      },
      "required": [
        "cashflows"
      ]
    },
    "exampleResponse": {
      "periods": 4,
      "discount_rate": 0.08,
      "npv": 164.6354,
      "irr": 0.153221,
      "irr_percent": 15.322,
      "decision": "accept: positive NPV at the discount rate",
      "profitability_index": 1.1646,
      "payback_periods": 2.6,
      "discounted_payback_periods": 2.96,
      "total_undiscounted_return": 400,
      "cashflows": [
        -1000,
        300,
        400,
        500,
        200
      ],
      "npv_at_rates": [
        {
          "rate": 0,
          "npv": 400
        },
        {
          "rate": 0.05,
          "npv": 244.99
        },
        {
          "rate": 0.1,
          "npv": 115.57
        },
        {
          "rate": 0.15,
          "npv": 6.44
        },
        {
          "rate": 0.2,
          "npv": -86.42
        }
      ],
      "note": "Cash flows are assumed to arrive at equal period intervals starting with period 0 (the outlay). IRR is the discount rate that makes NPV zero; with sign changes in the middle of the series more than one IRR can exist and this returns the first bracketed root.",
      "source": "discounted cash flow"
    },
    "parameterLocation": "query",
    "extensions": {
      "bazaar": {
        "info": {
          "input": {
            "type": "http",
            "method": "GET",
            "queryParams": {
              "cashflows": "-1000,300,400,500,200",
              "rate": "0.08"
            }
          },
          "output": {
            "type": "json",
            "example": {
              "periods": 4,
              "discount_rate": 0.08,
              "npv": 164.6354,
              "irr": 0.153221,
              "irr_percent": 15.322,
              "decision": "accept: positive NPV at the discount rate",
              "profitability_index": 1.1646,
              "payback_periods": 2.6,
              "discounted_payback_periods": 2.96,
              "total_undiscounted_return": 400,
              "cashflows": [
                -1000,
                300,
                400,
                500,
                200
              ],
              "npv_at_rates": [
                {
                  "rate": 0,
                  "npv": 400
                },
                {
                  "rate": 0.05,
                  "npv": 244.99
                },
                {
                  "rate": 0.1,
                  "npv": 115.57
                },
                {
                  "rate": 0.15,
                  "npv": 6.44
                },
                {
                  "rate": 0.2,
                  "npv": -86.42
                }
              ],
              "note": "Cash flows are assumed to arrive at equal period intervals starting with period 0 (the outlay). IRR is the discount rate that makes NPV zero; with sign changes in the middle of the series more than one IRR can exist and this returns the first bracketed root.",
              "source": "discounted cash flow"
            }
          }
        },
        "schema": {
          "$schema": "https://json-schema.org/draft/2020-12/schema",
          "type": "object",
          "properties": {
            "input": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "const": "http"
                },
                "method": {
                  "type": "string",
                  "enum": [
                    "GET"
                  ]
                },
                "queryParams": {
                  "type": "object",
                  "properties": {
                    "cashflows": {
                      "type": "string",
                      "description": "Comma-separated cash flows, initial outlay first (negative)"
                    },
                    "rate": {
                      "type": "string",
                      "description": "optional discount rate decimal, default 0.10"
                    }
                  },
                  "required": [
                    "cashflows"
                  ]
                }
              },
              "required": [
                "type",
                "method"
              ],
              "additionalProperties": false
            },
            "output": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "const": "json"
                },
                "example": {
                  "type": "object",
                  "properties": {
                    "periods": {
                      "type": "number",
                      "description": "Number of periods in the cash flow series"
                    },
                    "discount_rate": {
                      "type": "number",
                      "description": "Discount rate"
                    },
                    "npv": {
                      "type": "number",
                      "description": "Net present value at the discount rate"
                    },
                    "irr": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Internal rate of return per period"
                    },
                    "irr_percent": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Irr, as a percentage"
                    },
                    "decision": {
                      "type": "string",
                      "description": "Accept or reject verdict from NPV"
                    },
                    "profitability_index": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Profitability index"
                    },
                    "payback_periods": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Payback periods"
                    },
                    "discounted_payback_periods": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Discounted payback periods"
                    },
                    "npv_at_rates": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "npv": {
                            "description": "Net present value at that rate",
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "rate": {
                            "description": "Rate"
                          }
                        }
                      },
                      "description": "Npv at rates"
                    },
                    "note": {
                      "type": "string",
                      "description": "Caveat or context for reading the result"
                    },
                    "source": {
                      "type": "string",
                      "description": "Data source the values come from"
                    },
                    "cashflows": {
                      "description": "The cash flows that were evaluated",
                      "type": [
                        "array",
                        "null"
                      ]
                    },
                    "total_undiscounted_return": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Total undiscounted return"
                    }
                  },
                  "required": [
                    "periods",
                    "npv",
                    "decision"
                  ]
                }
              },
              "required": [
                "type"
              ]
            }
          },
          "required": [
            "input"
          ]
        }
      }
    },
    "examples": [
      {
        "label": "Unpaid discovery call",
        "method": "GET",
        "url": "https://saylorinnovations.com/api/finance/npv-irr?cashflows=-1000,300,400,500,200&rate=0.08",
        "expectedStatus": 402
      }
    ],
    "cacheTtlSeconds": 0,
    "capabilities": [],
    "noAccountRequired": true,
    "noApiKeyRequired": true,
    "sideEffects": "Paid calls settle the advertised payment; see the provider contract for execution behavior.",
    "payment": {
      "protocol": "x402",
      "settlement": "direct-to-provider"
    },
    "provider": {
      "name": "Saylor Innovations",
      "host": "saylorinnovations.com",
      "manifestUrl": "https://saylorinnovations.com/.well-known/x402.json"
    }
  },
  "liveness": {
    "reliability": null
  },
  "verified": true,
  "featured": false,
  "provider": {
    "host": "saylorinnovations.com",
    "manifest_name": "Saylor Innovations Knowledge Base",
    "source": "submitted",
    "source_manifest_url": "https://saylorinnovations.com/.well-known/x402.json",
    "submitted_at": "2026-10-26T05:52:02.113Z"
  },
  "exampleResponse": {
    "periods": 0,
    "discount_rate": 0,
    "npv": 0,
    "irr": 0,
    "irr_percent": 0,
    "decision": "string",
    "profitability_index": 0,
    "payback_periods": 0,
    "discounted_payback_periods": 0,
    "npv_at_rates": [
      {
        "npv": 0,
        "rate": null
      }
    ],
    "note": "string",
    "source": "string",
    "cashflows": [
      "value"
    ],
    "total_undiscounted_return": 0
  }
}