---
title: "15-vs-30 term comparison with invest-the-difference"
method: POST
path: "/v1/mortgage/term-comparison"
tags: ["Utilities"]
---

# 15-vs-30 term comparison with invest-the-difference

`POST /v1/mortgage/term-comparison`

## Request

- Base URL: `https://api.numeratica.com`
- URL: `https://api.numeratica.com/v1/mortgage/term-comparison`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

Pay the mortgage down fast, or take the longer term and invest the difference? Holds the monthly budget equal to the higher (short-term) payment: the short-term path pays the house off sooner and then invests the freed-up payment; the long-term path invests the monthly difference throughout. Reports the interest each path pays and the terminal wealth at the longer horizon, and names the winner. Deterministic; not lending or investment advice.

## Request body

- TermComparisonRequest
  - `loan_amount` number, required
  - `short_term_months` integer: Shorter loan; omit for 180 (15 yr).
  - `short_rate` number, required: Annual APR on the shorter loan.
  - `long_term_months` integer: Longer loan; omit for 360 (30 yr).
  - `long_rate` number, required: Annual APR on the longer loan.
  - `investment_return` number, required: Annual return on invested cash.

## Response `200`

The term comparison

- TermComparisonResponse
  - `result_id` string
  - `engine_version` string
  - `inputs` TermComparisonRequest
    - `loan_amount` number, required
    - `short_term_months` integer: Shorter loan; omit for 180 (15 yr).
    - `short_rate` number, required: Annual APR on the shorter loan.
    - `long_term_months` integer: Longer loan; omit for 360 (30 yr).
    - `long_rate` number, required: Annual APR on the longer loan.
    - `investment_return` number, required: Annual return on invested cash.
  - `result` object
    - `short_payment` number: Monthly P&I on the shorter loan.
    - `long_payment` number: Monthly P&I on the longer loan.
    - `monthly_difference` number: short − long.
    - `short_total_interest` number: Interest paid over the shorter loan.
    - `long_total_interest` number: Interest paid over the longer loan.
    - `interest_saved` number: long − short (the short loan's interest saving).
    - `short_path_wealth` number: Pay off fast, then invest the full payment for the rest, valued at the longer horizon.
    - `long_path_wealth` number: Keep the long loan and invest the monthly difference throughout, valued at the longer horizon.
    - `better_path` 'short_term' | 'long_term_invest'
    - `wealth_advantage` number: |short path − long path| at the longer horizon.
  - `disclaimer` string

## Other responses

- `400`: Invalid request
- `401`: Missing or invalid API key.
- `405`: Method not allowed
- `429`: The key's per-minute request budget is exceeded. Retry after the delay in the Retry-After header.
- `503`: A dependency (e.g. the key store) is temporarily unavailable, or the request exceeded its compute deadline. Retryable.

---

[API](https://skmtc.dev/numeratica/apis/numeratica-financial-planning-calculations-api.md) · [All operations](https://skmtc.dev/numeratica/apis/numeratica-financial-planning-calculations-api/llms.txt) · [OpenAPI document](https://skmtc.dev/numeratica/apis/numeratica-financial-planning-calculations-api/revisions/075bcfbd1ebf?raw)
