{
  "id": "crypto-profit",
  "version": "d0404a104e71",
  "status": "published",
  "name": "Crypto Profit Calculator",
  "question": "What is my crypto profit?",
  "summary": "Computes the coins bought, the sale value, the fees, and the profit or loss and return on a crypto trade, from the amount invested and the buy and sell prices you type.",
  "category": "finance",
  "subcategory": "investing",
  "url": "https://www.acalculator.org/finance/crypto-profit-calculator",
  "markdown": "https://www.acalculator.org/finance/crypto-profit-calculator.md",
  "kind": "function",
  "method": "Coins = invested × (1 − buy fee) ÷ buy price; you get back = coins × sell price × (1 − sell fee); profit = you get back − invested; return = profit ÷ invested × 100.",
  "assumptions": [
    "Prices are what you type; nothing is looked up.",
    "Each fee is a percent of its trade: the buy fee of the amount invested, the sell fee of the sale value.",
    "Taxes and network (withdrawal) fees are not included. This is an estimate, not tax or investment advice."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "invest": {
        "title": "Amount invested",
        "description": "The money you spent on the purchase, including the buy fee.",
        "type": "number",
        "x-unit": "USD",
        "exclusiveMinimum": 0,
        "maximum": 1000000000000
      },
      "buy": {
        "title": "Buy price per coin",
        "description": "The price of one coin when you bought, in dollars.",
        "type": "number",
        "x-unit": "USD",
        "exclusiveMinimum": 0,
        "maximum": 1000000000
      },
      "sell": {
        "title": "Sell price per coin",
        "description": "The price of one coin when you sell, or the price you expect.",
        "type": "number",
        "x-unit": "USD",
        "minimum": 0,
        "maximum": 1000000000
      },
      "buyfee": {
        "title": "Buy fee",
        "description": "The exchange fee on the purchase, as a percent of the amount invested.",
        "type": "number",
        "x-unit": "percent",
        "minimum": 0,
        "maximum": 99
      },
      "sellfee": {
        "title": "Sell fee",
        "description": "The exchange fee on the sale, as a percent of the sale value.",
        "type": "number",
        "x-unit": "percent",
        "minimum": 0,
        "maximum": 99
      }
    }
  },
  "outputs": {
    "profit": {
      "label": "Profit or loss",
      "description": "What you get back after the sell fee, minus the amount invested. Negative for a loss.",
      "format": "money"
    },
    "roi": {
      "label": "Return",
      "description": "The profit as a percent of the amount invested.",
      "format": "percent"
    },
    "coins": {
      "label": "Coins bought",
      "description": "The amount invested minus the buy fee, divided by the buy price.",
      "format": "number"
    },
    "value": {
      "label": "Sale value",
      "description": "Coins × sell price, before the sell fee.",
      "format": "money"
    },
    "proceeds": {
      "label": "You get back",
      "description": "The sale value minus the sell fee.",
      "format": "money"
    },
    "fees": {
      "label": "Total fees",
      "description": "The buy fee plus the sell fee, in dollars.",
      "format": "money"
    },
    "breakEven": {
      "label": "Break-even sell price",
      "description": "The sell price per coin at which the profit is exactly $0, after both fees.",
      "format": "money"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "invest": 1000,
      "buy": 40000,
      "sell": 60000,
      "buyfee": 0,
      "sellfee": 0
    },
    "outputs": {
      "profit": 500,
      "roi": 50,
      "coins": 0.025,
      "value": 1500,
      "proceeds": 1500,
      "fees": 0,
      "breakEven": 40000
    },
    "text": "$1,000.00 invested at $40,000.00 a coin and sold at $60,000.00 gives $500.00 (50% return)."
  },
  "examples": [
    {
      "given": {
        "invest": 1000,
        "buy": 40000,
        "sell": 60000
      },
      "expect": {
        "coins": 0.025,
        "value": 1500,
        "profit": 500,
        "roi": 50,
        "breakEven": 40000
      },
      "source": "IRS, Frequently asked questions on virtual currency transactions: basis is the amount spent including fees, and the gain is the amount received minus basis (https://www.irs.gov/individuals/international-taxpayers/frequently-asked-questions-on-virtual-currency-transactions); hand calculation in content.mdx"
    },
    {
      "given": {
        "invest": 2500,
        "buy": 2000,
        "sell": 2600,
        "buyfee": 0.5,
        "sellfee": 0.5
      },
      "expect": {
        "coins": 1.24375,
        "value": 3233.75,
        "proceeds": 3217.58125,
        "fees": 28.66875,
        "profit": 717.58125,
        "roi": 28.70325,
        "breakEven": 2020.15100628772
      },
      "source": "IRS, Frequently asked questions on virtual currency transactions, basis and gain (https://www.irs.gov/individuals/international-taxpayers/frequently-asked-questions-on-virtual-currency-transactions); hand calculation in content.mdx"
    },
    {
      "given": {
        "invest": 500,
        "buy": 0.62,
        "sell": 0.41,
        "buyfee": 1.5,
        "sellfee": 1.5
      },
      "expect": {
        "profit": -179.19979838709676,
        "coins": 794.3548387096774,
        "roi": -35.83995967741936,
        "fees": 12.385282258064516
      },
      "source": "IRS, Frequently asked questions on virtual currency transactions, basis and gain (https://www.irs.gov/individuals/international-taxpayers/frequently-asked-questions-on-virtual-currency-transactions); hand calculation in content.mdx"
    }
  ],
  "sources": [
    "Internal Revenue Service, Frequently asked questions on virtual currency transactions: basis includes fees; gains on property. https://www.irs.gov/individuals/international-taxpayers/frequently-asked-questions-on-virtual-currency-transactions",
    "U.S. Securities and Exchange Commission, Investor.gov: Crypto assets. https://www.investor.gov/additional-resources/spotlight/crypto-assets"
  ],
  "related": [
    "stock-profit",
    "roi",
    "stock",
    "rate-of-return",
    "cagr"
  ],
  "changelog": []
}
