Crypto Portfolio Allocation Calculator and Rebalancing Trades
A 70,000 crypto portfolio split 42.86%, 42.86% and 14.29% needs 9,000 of sales and 9,000 of purchases to reach targets of 50, 30 and 20%. Enter each coin's quantity, price and target to see every trade. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
This crypto portfolio allocation calculator turns coin quantities and current prices into a clear view of portfolio weight, then calculates the trades required to reach your chosen targets. Enter every holding in the same quote currency, assign target percentages that total 100, and receive current values, current shares, target values, and suggested buy or sell quantities.
Build an accurate snapshot of the portfolio
Start by entering one row for every crypto asset you want included in the allocation. Each row needs a unique symbol, the quantity held, the current price, and its target percentage. Use the same quote currency for all prices: if Bitcoin is priced in US dollars, every other asset must also use US dollars.
The calculator multiplies quantity by price to find each current value, adds those values to obtain the portfolio total, and divides each asset value by that total to calculate its current percentage. Prices are deliberately supplied by you because the tool does not contact an exchange or assume which market, venue, or currency should be authoritative. That makes a saved input reproducible and lets you use exchange quotes, accounting marks, or scenario prices.
Include zero-quantity assets when you want the rebalancing plan to show a new position to buy. Do not omit an existing asset merely because its target is zero; include it with a zero target so the result identifies the full sale needed to leave that position.
Read the allocation and rebalancing results
For each holding, the result shows its current value and percentage alongside its requested target percentage and target value. The difference between current value and target value becomes the proposed trade. A positive difference is labeled buy, a negative difference is labeled sell, and a negligible difference is labeled hold.
Trade value is returned as a positive magnitude, while trade action supplies its direction; this avoids ambiguous negative order amounts. Trade quantity divides that value by the price you entered and is rounded to at most eight decimal places. The summary also reports total buys and total sells.
Before rounding, a fully invested portfolio with targets totaling 100 produces equal buy and sell value because the calculation reallocates the existing total rather than adding or withdrawing money. Small displayed differences can appear when individual monetary values are rounded. Treat the output as a mathematical rebalancing plan, not as executable exchange orders: fees, spreads, slippage, minimum order sizes, taxes, locked staking balances, and unavailable trading pairs are not included.
Choose targets and apply the plan responsibly
Targets must total exactly 100 percent, which makes the allocation complete and prevents an unexplained cash surplus or leveraged shortfall. The calculator does not recommend targets or judge whether they match your risk tolerance. You can use it to test a conservative core-and-satellite mix, compare a current portfolio with an investment policy, or model a hypothetical price scenario.
After calculating, review the largest deviations first and decide whether a full rebalance is appropriate. Many investors use tolerance bands to avoid frequent small trades: for example, they act only when an asset differs materially from its target. You can apply that policy outside the calculator by ignoring trades below your own threshold.
Confirm live prices immediately before placing orders, round quantities down to the exchange precision, and account for fees or taxes that may reduce the amount available for purchases. No live prices are fetched, so the output remains entirely dependent on the quantities, prices, and targets you submit.
What you can do with it
Plan a periodic rebalance
Compare current crypto weights with a standing allocation policy and calculate the buy and sell quantities for a monthly or quarterly review.
Model a price scenario
Enter hypothetical prices to see how market moves would change portfolio concentration and which trades would restore the targets.
Prepare an exchange order checklist
Turn balances across several assets into a directional list of trades to review against fees, limits, and available pairs before execution.
FAQ
Does the calculator fetch live crypto prices?
No. You provide every price, which keeps the calculation reproducible and lets you choose the exchange, quote currency, or scenario values.
Why must target percentages total 100?
The tool reallocates the entire stated portfolio. A 100 percent total ensures every unit of portfolio value has a destination and that buys balance sells before rounding.
Are trading fees and taxes included?
No. The proposed trades exclude fees, spreads, slippage, taxes, exchange precision, and minimum order sizes. Review those constraints before trading.
Can I add an asset I do not currently own?
Yes. Add it with a quantity of zero, a positive current price, and its desired target percentage. The result will calculate a buy quantity.
How do I remove an asset from the target portfolio?
Keep the existing holding in the input and set its target percentage to zero. The output will show the amount and quantity to sell.
What does it cost?
The same deterministic calculation can also run free in your browser.
Related tools
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/finance/crypto-portfolio-allocation \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"holdings":[{"symbol":"BTC","quantity":0.5,"price":60000,"target_percent":50},{"symbol":"ETH","quantity":10,"price":3000,"target_percent":30},{"symbol":"SOL","quantity":100,"price":100,"target_percent":20}]}'const res = await fetch("https://api.kit.forhosting.com/finance/crypto-portfolio-allocation", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"holdings": [
{
"symbol": "BTC",
"quantity": 0.5,
"price": 60000,
"target_percent": 50
},
{
"symbol": "ETH",
"quantity": 10,
"price": 3000,
"target_percent": 30
},
{
"symbol": "SOL",
"quantity": 100,
"price": 100,
"target_percent": 20
}
]
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/finance/crypto-portfolio-allocation",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"holdings": [
{
"symbol": "BTC",
"quantity": 0.5,
"price": 60000,
"target_percent": 50
},
{
"symbol": "ETH",
"quantity": 10,
"price": 3000,
"target_percent": 30
},
{
"symbol": "SOL",
"quantity": 100,
"price": 100,
"target_percent": 20
}
]
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/finance/crypto-portfolio-allocation", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"holdings":[{"symbol":"BTC","quantity":0.5,"price":60000,"target_percent":50},{"symbol":"ETH","quantity":10,"price":3000,"target_percent":30},{"symbol":"SOL","quantity":100,"price":100,"target_percent":20}]}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"holdings":[{"symbol":"BTC","quantity":0.5,"price":60000,"target_percent":50},{"symbol":"ETH","quantity":10,"price":3000,"target_percent":30},{"symbol":"SOL","quantity":100,"price":100,"target_percent":20}]}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/finance/crypto-portfolio-allocation", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"holdings": [
{
"symbol": "BTC",
"quantity": 0.5,
"price": 60000,
"target_percent": 50
},
{
"symbol": "ETH",
"quantity": 10,
"price": 3000,
"target_percent": 30
},
{
"symbol": "SOL",
"quantity": 100,
"price": 100,
"target_percent": 20
}
]
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "finance.crypto_portfolio_allocation",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Limits
max_items | 200 |
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
The calculation is deterministic, runs without market-data lookups, and can be used interactively in your browser or automated through the API.
Choose targets and apply the plan responsibly
The API costs $0.002 per request, while the browser calculation is useful for private, quick checks.