{
  "id": "geometric-sequence",
  "version": "c9a876bbee80",
  "status": "published",
  "name": "Geometric Sequence Calculator",
  "question": "What is my geometric sequence?",
  "summary": "Finds the nth term, the sum of the first n terms, and the sum to infinity of a geometric sequence from its first term and common ratio, with the first terms and the formulas.",
  "category": "math",
  "subcategory": "algebra",
  "url": "https://www.acalculator.org/math/geometric-sequence-calculator",
  "markdown": "https://www.acalculator.org/math/geometric-sequence-calculator.md",
  "kind": "function",
  "method": "aₙ = a₁ × r^(n − 1); Sₙ = a₁(1 − rⁿ)/(1 − r), or n × a₁ when r = 1; for −1 < r < 1 the sum to infinity is a₁/(1 − r).",
  "assumptions": [
    "Terms are numbered from 1; the first term is a₁.",
    "The numbers are read as the exact decimals typed and the formulas are worked out in exact fractions; each result is then the nearest 64-bit float.",
    "A term or sum beyond about 1.8 × 10^308 has no answer."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "a": {
        "title": "First term (a₁)",
        "description": "The first term of the sequence.",
        "type": "number",
        "minimum": -1000000000,
        "maximum": 1000000000
      },
      "r": {
        "title": "Common ratio (r)",
        "description": "What each term is multiplied by to get the next one.",
        "type": "number",
        "minimum": -1000,
        "maximum": 1000
      },
      "n": {
        "title": "Term number (n)",
        "description": "Which term to find, and how many terms to add up, from 1 to 10,000.",
        "type": "integer",
        "minimum": 1,
        "maximum": 10000
      }
    }
  },
  "outputs": {
    "nth": {
      "label": "nth term (aₙ)",
      "description": "The value of term number n.",
      "format": "number"
    },
    "sum": {
      "label": "Sum of the first n terms (Sₙ)",
      "description": "a₁ + a₂ + … + aₙ.",
      "format": "number"
    },
    "terms": {
      "label": "First terms",
      "description": "The first terms of the sequence, up to 10 of them.",
      "format": "text"
    },
    "explicit": {
      "label": "Explicit formula",
      "description": "A formula for term number n on its own.",
      "format": "text"
    },
    "recursive": {
      "label": "Recursive formula",
      "description": "The first term, and how each term follows from the one before.",
      "format": "text"
    },
    "infinite": {
      "label": "Sum to infinity",
      "description": "For a geometric sequence with −1 < r < 1, the limit of the sums: a₁ ÷ (1 − r).",
      "format": "number"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "a": 2,
      "r": 2,
      "n": 10
    },
    "outputs": {
      "nth": 1024,
      "sum": 2046,
      "terms": "2, 4, 8, 16, 32, 64, 128, 256, 512, 1024",
      "explicit": "a_n = 2 × 2^(n - 1)",
      "recursive": "a_1 = 2, a_n = 2 × a_(n - 1)"
    },
    "text": "Term 10 is 1,024, and the sum of terms 1 to 10 is 2,046."
  },
  "examples": [
    {
      "given": {
        "a": 8,
        "r": -0.5,
        "n": 11
      },
      "expect": {
        "nth": 0.0078125,
        "sum": 5.3359375,
        "infinite": 5.333333333333333,
        "recursive": "a_1 = 8, a_n = (-0.5) × a_(n - 1)"
      },
      "source": "OpenStax, Algebra and Trigonometry 2e, section 13.4 Series and Their Notations (Sₙ = a₁(1 − rⁿ)/(1 − r), S = a₁/(1 − r) for |r| < 1), https://openstax.org/books/algebra-and-trigonometry-2e/pages/13-4-series-and-their-notations, retrieved 2026-10-02, example: 8 + (−4) + 2 + … has S₁₁ ≈ 5.336; hand calculation in content.mdx: S₁₁ = 8(1 + 1/2048)/(3/2) = 5.3359375 exactly"
    },
    {
      "given": {
        "a": 248.6,
        "r": 0.4,
        "n": 3
      },
      "expect": {
        "nth": 39.776,
        "sum": 387.816,
        "infinite": 414.3333333333333,
        "terms": "248.6, 99.44, 39.776"
      },
      "source": "OpenStax, Algebra and Trigonometry 2e, section 13.4 Series and Their Notations (Sₙ = a₁(1 − rⁿ)/(1 − r), S = a₁/(1 − r) for |r| < 1), https://openstax.org/books/algebra-and-trigonometry-2e/pages/13-4-series-and-their-notations, retrieved 2026-10-02, example: 248.6 + 99.44 + 39.776 + … = 414.3̅"
    },
    {
      "given": {
        "a": 3,
        "r": 2,
        "n": 8
      },
      "expect": {
        "nth": 384,
        "sum": 765,
        "terms": "3, 6, 12, 24, 48, 96, 192, 384",
        "explicit": "a_n = 3 × 2^(n - 1)"
      },
      "source": "OpenStax, Algebra and Trigonometry 2e, section 13.3 Geometric Sequences (aₙ = a₁rⁿ⁻¹), https://openstax.org/books/algebra-and-trigonometry-2e/pages/13-3-geometric-sequences, retrieved 2026-10-02; hand calculation in content.mdx: a₈ = 3 × 2⁷ = 384, S₈ = 3 × (2⁸ − 1) = 765"
    },
    {
      "given": {
        "a": 5,
        "r": -3,
        "n": 4
      },
      "expect": {
        "nth": -135,
        "sum": -100
      },
      "source": "hand calculation in content.mdx: 5, −15, 45, −135; S₄ = 5(1 − 81)/(1 + 3) = −100"
    }
  ],
  "sources": [
    "OpenStax, Algebra and Trigonometry 2e, section 13.3 Geometric Sequences (aₙ = a₁rⁿ⁻¹), CC BY 4.0, retrieved 2026-10-02. https://openstax.org/books/algebra-and-trigonometry-2e/pages/13-3-geometric-sequences",
    "OpenStax, Algebra and Trigonometry 2e, section 13.4 Series and Their Notations (Sₙ = a₁(1 − rⁿ)/(1 − r); S = a₁/(1 − r) for −1 < r < 1; examples 8 + (−4) + 2 + … and 248.6 + 99.44 + 39.776 + …), CC BY 4.0, retrieved 2026-10-02. https://openstax.org/books/algebra-and-trigonometry-2e/pages/13-4-series-and-their-notations"
  ],
  "related": [
    "sequence",
    "arithmetic-sequence",
    "exponential-growth"
  ],
  "changelog": []
}
