Embed the Bitcoin DCA Calculator
One iframe drops a live Bitcoin dollar-cost-averaging result card into an article, a newsletter archive, or a docs page. It shows what buying a fixed amount on a regular schedule would have come to, worked out each time it loads from daily price history (refreshed hourly) and the latest price. Free, no API key, no accounts, no tracking scripts.
What it looks like
What follows is the real widget, not a screenshot: $50 of Bitcoin every week since January 2021, with no exchange fee. By default it follows whichever light or dark preference the reader's browser reports.
Copy the code
Paste this wherever the card should appear, then swap the query parameters for whatever scenario your piece is about. One click on the block selects all of it.
<iframe
src="https://btcdollarcostaverage.com/embed?amount=50&frequency=weekly&startDate=2021-01-01&fee=0"
title="Bitcoin DCA Calculator"
width="100%"
height="300"
loading="lazy"
frameborder="0"
style="border:0;max-width:600px;border-radius:16px"
></iframe>Sizing
The card is responsive and has no fixed pixel width. It's built for roughly 400–600 px wide and 300–340 px tall, and 300 px of height is the sweet spot. Below about 320 px wide the text stays legible but gets tight. Set the iframe width to 100%, cap it with max-width, and it adapts on mobile.
The small line above the figure states the plan and what shaped the number: the fee, an end date in the future, the exchange rate behind a currency other than US dollars and, with provider=kraken, how many buy prices are estimates. In a column narrower than about 500 px that line often takes a second row, which 300 px of height still fits. A third row, from several of these together on a phone, needs about 310 px, and each row after that 15 px more.
Parameters
Every parameter is optional. One that is missing, or holds a value the widget cannot use, falls back to its default, so even a bare /embed URL renders a sensible card. Settings that leave nothing to work out (an amount of zero, a flat fee as large as the amount, a start date after the end date or after today) show a short explanation in place of the figures.
| Parameter | Accepted values | Default | Example |
|---|---|---|---|
amount | number > 0 | 50 | amount=100 |
frequency | daily | weekly | biweekly | monthly | weekly | frequency=monthly |
startDate | YYYY-MM-DD | 5 years before the end date | startDate=2017-12-17 |
endDate | YYYY-MM-DD | today (UTC) | endDate=2024-12-31 |
fee | number, 0-50 (percent per buy) | 0.5 | fee=0 |
flat | number, 0-1,000,000 (fixed fee per buy, in the display currency) | 0 | flat=0.99 |
provider | coinbase | kraken | coinbase | provider=kraken |
currency | USD | EUR | GBP | CAD | AUD | JPY | USD | currency=EUR |
theme | light | dark | auto | auto | theme=dark |
Dates are UTC calendar days, and amounts are denominated in whichever display currency you pick. A start date before Aug 18, 2010, the first day of our price data, is moved up to that day, and the default start date is never earlier than it. The card counts only purchases that have already happened: give it an end date in the future and it shows the plan up to today and says when the plan ends.
A card in a currency other than US dollars is the dollar result converted. Every buy uses one recent European Central Bank reference rate, not the rate on its own date, so the bitcoin stacked and the return differ from what a buyer in that currency would have got. The card gives the date of the rate it used.
With provider=coinbase the prices from Jul 20, 2015 on are one close per UTC day. With provider=kraken they are one close per week, with the days in between filled in along a straight line, and the card says how many of its buy prices are estimates. Earlier dates use the same bundled blockchain.info series either way. Results come from the same engine and data as the main calculator; the methodology page spells out exactly how each number is computed.
Examples
$250 per month since 2018, dark
Forced dark theme for a dark-background site.
<iframe src="https://btcdollarcostaverage.com/embed?amount=250&frequency=monthly&startDate=2018-01-01&fee=0&theme=dark" title="Bitcoin DCA Calculator" width="100%" height="300" loading="lazy" frameborder="0" style="border:0;max-width:600px"></iframe>$25 per week since the 2017 top
Starts on December 17, 2017, the day bitcoin set its 2017 high on Coinbase, with a 1% fee on every buy. Priced from Coinbase.
<iframe src="https://btcdollarcostaverage.com/embed?amount=25&frequency=weekly&startDate=2017-12-17&fee=1&provider=coinbase" title="Bitcoin DCA Calculator" width="100%" height="300" loading="lazy" frameborder="0" style="border:0;max-width:600px"></iframe>€100 per week since 2020
Amounts and results shown in euros. Every buy is converted at one recent European Central Bank rate, not the rate on its own date. The card gives the date of that rate.
<iframe src="https://btcdollarcostaverage.com/embed?amount=100&frequency=weekly&startDate=2020-01-01&fee=0¤cy=EUR" title="Bitcoin DCA Calculator" width="100%" height="300" loading="lazy" frameborder="0" style="border:0;max-width:600px"></iframe>Terms
- •Free to embed on any site, personal or commercial. No permission needed, no attribution beyond the widget itself.
- •Please leave the attribution link inside the card intact. It is how your readers reach the full calculator. The widget itself shows no ads; the labeled ads and affiliate links on the site's own pages are there to help cover hosting, and the price data comes from free public sources. How the site is funded.
- •The widget loads no third-party scripts, sets no cookies and runs no analytics. As with any iframe, the reader's browser requests it from our host (Vercel), which receives the usual details of a web request, such as the IP address.
- •Results are a historical simulation for education, not financial advice. Past performance does not guarantee future results.
Build the scenario first
Set the amount, schedule, dates, and fees in the full calculator, then copy those same values into your embed URL. Leave out endDate and the card keeps running to today.