DIMA Tools
Pure Math Engine · 100% Browser-Local · Fractional Shares & Crypto

Stock Average Down & Cost Basis Calculator

Compute weighted average cost across multiple entries, include trading fees and sell taxes for your true breakeven price, and compare recovery gain percentages before and after averaging down.

01
Up to 10-Lot Weighted Average

Track exact cost basis and capital weight across equities, ETFs, fractional shares, and crypto.

02
Target Average Reverse Solver

Find the exact share count and capital multiple required to reach a specific average price.

03
Fee-Adjusted Breakeven & P&L

Factor in maker/taker commissions and sell taxes to see real net profit and recovery thresholds.

Purchase Lots

Commission & Tax Presets
Lot 1
$5,000.00
Lot 2
$3,500.00
Final Average Cost Basis vs Lot 1 -$15.00 (-15.00%)
$85.00
Breakeven Sell Price (incl. costs) $85.00
Price Position Comparison
Current New Avg Lot 1
Current
New Avg
Lot 1
Total Shares / Qty 100 sh
Total Invested (incl. fee) $8,500.00
Unrealized P&L · Return -$1,500.00 -17.65%
Gain Needed to Break Even +21.43% Before avg down: +42.86%

Lot Capital Allocation

Lot Buy Price Qty Cost Basis Weight
Lot 1 $100.00 50 $5,000.00
58.82%
Lot 2 $70.00 50 $3,500.00
41.18%

Purely mathematical estimates based on your inputs. Actual brokerage settlement may differ due to currency rounding rules, tick sizes, fee tiers, and applicable tax regulations.

Drawdown Recovery Gain Table & 1:1 / 1:2 Averaging Down Impact

Starting from a reference entry of 100 with 0% fees, this table compares the gain required to break even without averaging down against committing an equal (1:1) or double (1:2) amount of additional capital.

Drawdown No Avg Recovery Gain 1:1 New Loss 1:1 Recovery Gain 1:2 New Loss 1:2 Recovery Gain
-10% +11.1% -5.0% +5.3% -3.3% +3.4%
-15% +17.6% -7.5% +8.1% -5.0% +5.3%
-20% +25.0% -10.0% +11.1% -6.7% +7.1%
-25% +33.3% -12.5% +14.3% -8.3% +9.1%
-30% +42.9% -15.0% +17.6% -10.0% +11.1%
-40% +66.7% -20.0% +25.0% -13.3% +15.4%
-50% +100.0% -25.0% +33.3% -16.7% +20.0%
-60% +150.0% -30.0% +42.9% -20.0% +25.0%
-70% +233.3% -35.0% +53.8% -23.3% +30.4%
-80% +400.0% -40.0% +66.7% -26.7% +36.4%

Loss Reduction Matrix by Additional Capital Multiple (0.5x to 3x)

Each cell shows the revised drawdown and required recovery gain (in parentheses) when adding 0.5x to 3x your original capital at the current price. Marginal reduction diminishes as capital scales up.

Current Drop 0.5x Capital1x Capital2x Capital3x Capital
-20% -13.3% (+15.4%) -10.0% (+11.1%) -6.7% (+7.1%) -5.0% (+5.3%)
-30% -20.0% (+25.0%) -15.0% (+17.6%) -10.0% (+11.1%) -7.5% (+8.1%)
-40% -26.7% (+36.4%) -20.0% (+25.0%) -13.3% (+15.4%) -10.0% (+11.1%)
-50% -33.3% (+50.0%) -25.0% (+33.3%) -16.7% (+20.0%) -12.5% (+14.3%)
-60% -40.0% (+66.7%) -30.0% (+42.9%) -20.0% (+25.0%) -15.0% (+17.6%)

Core Cost Basis Formulas & Practical Reference

Four fundamental equations behind weighted share averaging, drawdown asymmetry, target solving, and fee-adjusted breakeven.

01

Weighted Average Share Price Formula

Avg Price = Σ(Lot Price × Lot Qty) ÷ Σ(Lot Qty)

Share count acts as the weight rather than a simple midpoint. Deploying equal dollar amounts at a lower price buys more shares, pulling your weighted cost basis below the arithmetic mean.

02

Asymmetric Drawdown Recovery Math

Recovery Gain % = (Avg Price − Current Price) ÷ Current Price × 100

A 50% decline requires a 100% rally to break even, while an 80% decline demands a 400% rally. As the denominator shrinks, recovery difficulty grows nonlinearly.

03

Target Average Reverse Formula & Asymptote

Needed Qty = Current Qty × (Target Avg − Current Avg) ÷ (Buy Price − Target Avg)

As the target average approaches the new buy price, the denominator approaches zero and required capital spikes exponentially. Your average can never equal or fall below the new entry price.

04

Fee & Sell-Tax Adjusted Breakeven Price

Breakeven = (Gross Buy × (1 + Fee)) ÷ Qty ÷ (1 − Sell Fee − Sell Tax)

Buy commissions increase your acquisition cost, while sell commissions and transaction taxes reduce exit proceeds. True breakeven therefore sits slightly above the raw weighted average.

Key Calculation Standards & Reference Notes

Weighted Average Calculation Across Multiple Purchase Lots

Each valid lot with positive price and quantity is multiplied and summed into total gross cost, then divided by total shares held. You can model up to 10 separate entry lots at once.

Impact of Trading Commissions and Sell Taxes on Breakeven

One-way commission rates are applied on both entry and exit, while sell taxes apply only to gross sell proceeds. Separating both rates gives an accurate net settlement figure.

Support for Fractional Shares and Cryptocurrency Quantities

All quantity fields accept decimal inputs down to six decimal places, suitable for fractional US equities and crypto spot positions. The Target Price tab displays both exact fractional shares and whole-share rounded-up totals.

Mathematical Bounds in the Target Average Price Solver

When averaging down (planned buy price below current average), the target must sit strictly between the planned buy price and current average. When averaging up, it must sit strictly between current average and the higher buy price.

Currency Conversion, Dividends, and Capital Gains Tax Scope

This tool performs pure single-currency arithmetic for trade entries, fees, and sell levies. Foreign exchange fluctuations, cash dividends, and annual capital gains tax exemptions should be accounted for separately.