{
  "id": "cash-counter",
  "version": "34a31afb4506",
  "status": "published",
  "name": "Cash Calculator",
  "question": "How much cash do I have?",
  "summary": "Counts cash: type how many of each US bill and coin you have to get the total, the bills and coins apart, the count of pieces, the deposit after a starting float, and the weight.",
  "category": "everyday-life",
  "subcategory": "money-and-shopping",
  "url": "https://www.acalculator.org/everyday-life/cash-counter-calculator",
  "markdown": "https://www.acalculator.org/everyday-life/cash-counter-calculator.md",
  "kind": "function",
  "method": "Each count is multiplied by its value in cents, and the cents are added, so the total is exact. Total = bills + coins; deposit = total − float. Weight = 1 g per bill plus each coin’s US Mint weight.",
  "assumptions": [
    "US bills ($1, $2, $5, $10, $20, $50, $100) and coins (1¢, 5¢, 10¢, 25¢, 50¢, $1). Counts are whole numbers from 0 to 10,000,000.",
    "Weights are nominal: about 1 g a bill (BEP) and the US Mint standard weight of each coin; worn coins weigh a little less.",
    "A deposit below $0 means the cash is short of the float. The weight in pounds uses 1 lb = 453.59237 g."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "b100": {
        "title": "$100 bills",
        "description": "How many $100 bills you have.",
        "type": "integer",
        "minimum": 0,
        "maximum": 10000000
      },
      "b50": {
        "title": "$50 bills",
        "description": "How many $50 bills you have.",
        "type": "integer",
        "minimum": 0,
        "maximum": 10000000
      },
      "b20": {
        "title": "$20 bills",
        "description": "How many $20 bills you have.",
        "type": "integer",
        "minimum": 0,
        "maximum": 10000000
      },
      "b10": {
        "title": "$10 bills",
        "description": "How many $10 bills you have.",
        "type": "integer",
        "minimum": 0,
        "maximum": 10000000
      },
      "b5": {
        "title": "$5 bills",
        "description": "How many $5 bills you have.",
        "type": "integer",
        "minimum": 0,
        "maximum": 10000000
      },
      "b2": {
        "title": "$2 bills",
        "description": "How many $2 bills you have.",
        "type": "integer",
        "minimum": 0,
        "maximum": 10000000
      },
      "b1": {
        "title": "$1 bills",
        "description": "How many $1 bills you have.",
        "type": "integer",
        "minimum": 0,
        "maximum": 10000000
      },
      "c100": {
        "title": "Dollar coins",
        "description": "How many dollar coins you have.",
        "type": "integer",
        "minimum": 0,
        "maximum": 10000000
      },
      "c50": {
        "title": "Half dollars",
        "description": "How many half dollars you have.",
        "type": "integer",
        "minimum": 0,
        "maximum": 10000000
      },
      "c25": {
        "title": "Quarters",
        "description": "How many quarters you have.",
        "type": "integer",
        "minimum": 0,
        "maximum": 10000000
      },
      "c10": {
        "title": "Dimes",
        "description": "How many dimes you have.",
        "type": "integer",
        "minimum": 0,
        "maximum": 10000000
      },
      "c5": {
        "title": "Nickels",
        "description": "How many nickels you have.",
        "type": "integer",
        "minimum": 0,
        "maximum": 10000000
      },
      "c1": {
        "title": "Pennies",
        "description": "How many pennies you have.",
        "type": "integer",
        "minimum": 0,
        "maximum": 10000000
      },
      "float": {
        "title": "Starting cash to keep (float)",
        "description": "Cash to leave in the drawer, taken off the total to give the deposit; $0 if none.",
        "type": "number",
        "x-unit": "USD",
        "minimum": 0,
        "maximum": 1000000000
      }
    }
  },
  "outputs": {
    "total": {
      "label": "Total cash",
      "description": "Every bill and coin, added up.",
      "format": "money"
    },
    "bills": {
      "label": "Bills",
      "description": "The bills added up.",
      "format": "money"
    },
    "coins": {
      "label": "Coins",
      "description": "The coins added up.",
      "format": "money"
    },
    "deposit": {
      "label": "Deposit after the float",
      "description": "Total cash minus the starting cash you keep.",
      "format": "money"
    },
    "pieces": {
      "label": "Pieces",
      "description": "How many bills and coins in all.",
      "format": "integer"
    },
    "grams": {
      "label": "Weight (g)",
      "description": "About 1 g per bill and the US Mint weight of each coin.",
      "format": "number"
    },
    "pounds": {
      "label": "Weight (lb)",
      "description": "The same weight in pounds (1 lb = 453.59237 g).",
      "format": "number"
    },
    "breakdown": {
      "label": "Count",
      "description": "Each kind you typed: how many, times its value.",
      "format": "text"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "b20": 5,
      "b10": 3,
      "b5": 4,
      "b1": 12,
      "c25": 8,
      "c10": 5,
      "c5": 4,
      "c1": 7
    },
    "outputs": {
      "total": 164.77,
      "bills": 162,
      "coins": 2.77,
      "pieces": 48,
      "grams": 118.2,
      "pounds": 0.2605863939025253,
      "breakdown": "$20 bills: 5 × $20.00 = $100.00; $10 bills: 3 × $10.00 = $30.00; $5 bills: 4 × $5.00 = $20.00; $1 bills: 12 × $1.00 = $12.00; Quarters: 8 × $0.25 = $2.00; Dimes: 5 × $0.10 = $0.50; Nickels: 4 × $0.05 = $0.20; Pennies: 7 × $0.01 = $0.07"
    },
    "text": "You have $164.77 in cash: $162.00 in bills and $2.77 in coins."
  },
  "examples": [
    {
      "given": {
        "b20": 5,
        "b10": 3,
        "b5": 4,
        "b1": 12,
        "c25": 8,
        "c10": 5,
        "c5": 4,
        "c1": 7
      },
      "expect": {
        "total": 164.77,
        "bills": 162,
        "coins": 2.77,
        "pieces": 48,
        "grams": 118.2,
        "pounds": 0.2605863939025253
      },
      "source": "U.S. Mint, Coin Specifications (cent 2.500 g, nickel 5.000 g, dime 2.268 g, quarter 5.670 g, half dollar 11.340 g, dollar 8.100 g), https://www.usmint.gov/learn/coins-and-medals/circulating-coins/coin-specifications (retrieved 2026-10-02); Bureau of Engraving and Printing, Currency FAQs (a note weighs about one gram, regardless of denomination), https://www.bep.gov/currency/faqs (retrieved 2026-10-02); hand calculation in content.mdx: 100 + 30 + 20 + 12 = $162 in bills, 2.00 + 0.50 + 0.20 + 0.07 = $2.77 in coins; Python 3"
    },
    {
      "given": {
        "c10": 3,
        "c1": 1
      },
      "expect": {
        "total": 0.31,
        "coins": 0.31,
        "bills": 0
      },
      "source": "U.S. Mint, Coin Specifications (cent 2.500 g, nickel 5.000 g, dime 2.268 g, quarter 5.670 g, half dollar 11.340 g, dollar 8.100 g), https://www.usmint.gov/learn/coins-and-medals/circulating-coins/coin-specifications (retrieved 2026-10-02); hand calculation in content.mdx: 3 × 10¢ + 1¢ = 31¢"
    },
    {
      "given": {
        "b100": 10,
        "b20": 25,
        "float": 150
      },
      "expect": {
        "total": 1500,
        "deposit": 1350,
        "grams": 35
      },
      "source": "Bureau of Engraving and Printing, Currency FAQs (a note weighs about one gram, regardless of denomination), https://www.bep.gov/currency/faqs (retrieved 2026-10-02); hand calculation in content.mdx: 10 × $100 + 25 × $20 = $1,500; minus $150 = $1,350"
    }
  ],
  "sources": [
    "U.S. Mint, Coin Specifications (weights: cent 2.500 g, nickel 5.000 g, dime 2.268 g, quarter 5.670 g, half dollar 11.340 g, dollar 8.100 g). https://www.usmint.gov/learn/coins-and-medals/circulating-coins/coin-specifications (retrieved 2026-10-02)",
    "Bureau of Engraving and Printing, Currency FAQs (the approximate weight of a note, regardless of denomination, is one gram) and Circulating Currency ($1, $2, $5, $10, $20, $50 and $100 notes). https://www.bep.gov/currency/faqs (retrieved 2026-10-02)"
  ],
  "related": [
    "tip",
    "unit-price",
    "discount"
  ],
  "changelog": []
}
