Skip to main content
Glama

dollar-cost-averaging-calculator

Read-onlyIdempotent

Project the final value of a dollar-cost averaging (DCA) plan — equal contributions at regular intervals — and compare against lump-summing the same total at time 0. Returns final value, total invested, gains, equivalent CAGR, optional inflation-adjusted figures, and the lump-sum head-to-head.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
frequencyYesContribution cadence. 'weekly' = 52/yr, 'biweekly' = 26/yr, 'monthly' = 12/yr.
period_countYesTotal number of contributions (e.g. 120 for 10 years of monthly contributions).
inflation_percentNoOptional annual inflation rate (e.g. 2.5). When provided, the engine also returns inflation-adjusted (today's dollars) final value and gains.
annual_return_percentYesExpected nominal annual return as a percentage (e.g. 8 for 8%). Negative values allowed for stress-testing; the periodic rate must remain > -100%.
contribution_per_periodYesAmount invested at the end of each period (e.g. 500 for $500 per month).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
final_valueYesFuture value of the DCA stream (nominal).
total_gainsYesfinal_value − total_invested.
total_yearsYesperiod_count / periods_per_year, for display.
total_investedYesSum of all contributions.
periods_per_yearYesEchoed from frequency.
real_final_valueYesInflation-adjusted final_value in today's dollars (null when inflation not provided).
real_total_gainsYesInflation-adjusted gains in today's dollars (null when inflation not provided).
lump_sum_advantageYeslump_sum_final_value − final_value. Positive when lump-sum beats DCA (typical with positive returns).
lump_sum_final_valueYesFuture value if the same total_invested were invested entirely at period 0.
equivalent_cagr_percentYesMoney-weighted annual return that reproduces final_value from the contribution stream.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint and idempotentHint, so the bar is lower. The description adds useful behavioral context by listing return values (final value, gains, CAGR, inflation-adjusted figures) and the lump-sum head-to-head, without contradicting annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, front-loaded with the primary purpose and followed by a concise list of outputs. No wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description, combined with a complete schema and output schema, gives enough context for a user to understand the tool's function and result. It could mention assumptions like constant return rates, but for a calculator this is sufficient.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so baseline is 3. The description adds minimal parameter nuance beyond the schema—only noting that inflation-adjusted figures are optional. It does not need to compensate for missing schema info.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool projects the final value of a DCA plan and compares it to lump-summing, naming specific outputs. This distinguishes it from sibling calculators by explicitly mentioning DCA and the lump-sum comparison.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context: it's for comparing DCA vs lump-sum investment. However, it does not explicitly mention when not to use it or name alternative tools, so it misses the full 'when/when-not' guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources