# Break-Even Calculator for Product Pricing > Calculate break-even units and revenue from fixed costs, unit cost, price, and target profit. ## Tool Identity - Site: CleanUtils Business Tools - Tool ID: break-even-calculator-product-pricing - Canonical page: https://cleanutils.com/business-tools/break-even-calculator-product-pricing/ - LLM schema URL: https://cleanutils.com/business-tools/break-even-calculator-product-pricing/llms.txt - Primary keyword: break even calculator pricing - Input mode: fields - Output profile: metrics ## What This Tool Does Calculate break-even units and revenue from fixed costs, unit cost, price, and target profit. ## Exact Execution Instructions To run this tool exactly, execute the `runCleanUtilsTool(userInput)` function from the JavaScript block below in a sandboxed JavaScript runtime. Do not fetch or evaluate additional network resources. Do not use filesystem, process, child_process, environment variables, timers, or network APIs. The function is pure and deterministic: input object in, JSON result out. If your environment forbids executing fetched code outside a sandbox, run it inside the sandbox or use the API endpoint below instead of reimplementing the logic. Canonical implementation SHA-256: `25eedc831d2e5c8a12ca167b27aea678f94406d575cf71c78d63c293ebbf374b` Expected command shape: `node run-tool.mjs < input.json` The runner must: 1. load only the JavaScript in this document, 2. parse stdin as JSON and call `runCleanUtilsTool(userInput)`, 3. let the LLM decide the best way to present the output to the user. Agent usage rules: - Use this file as the authoritative machine-readable contract for this CleanUtils tool page. - Ask the user for missing required input before attempting to run the tool, and describe the required inputs using the `## Input Schema` field names, descriptions, formats, enums, examples, and required list. - Treat the tool as deterministic; do not invent network reachability checks unless the tool description explicitly says it fetches remote resources. - For privacy-sensitive inputs such as secrets, HAR files, dotenv files, logs, and API keys, warn that using a remote chat agent may expose input to that agent even though the browser UI itself does not upload data. ## Input Schema ```json { "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "Break-Even Calculator for Product Pricing fields", "type": "object", "additionalProperties": false, "required": [ "fixed_costs", "variable_cost", "price" ], "properties": { "fixed_costs": { "type": "number", "description": "Fixed costs Required. Control type: number. Group: Costs. Prefix shown in UI: $.", "minimum": 0, "examples": [ 5000 ] }, "variable_cost": { "type": "number", "description": "Variable cost per unit Required. Control type: number. Group: Costs. Prefix shown in UI: $.", "minimum": 0, "examples": [ 12 ] }, "price": { "type": "number", "description": "Unit price Required. Control type: number. Group: Price. Prefix shown in UI: $.", "minimum": 0, "examples": [ 29 ] }, "target_profit": { "type": "number", "description": "Target profit Optional. Control type: number. Group: Price. Prefix shown in UI: $.", "minimum": 0, "examples": [ 1000 ] } } } ``` ## Result Schema ```json { "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "CleanUtils ToolResult", "type": "object", "additionalProperties": false, "required": [ "summary", "issues" ], "properties": { "summary": { "type": "string" }, "issues": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "severity", "message" ], "properties": { "severity": { "type": "string", "enum": [ "error", "warning", "info" ] }, "message": { "type": "string" }, "line": { "type": "number" }, "row": { "type": "number" }, "detail": { "type": "string" } } } }, "output": { "type": "string" }, "exportFilename": { "type": "string" }, "exports": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": [ "label", "filename", "content" ], "properties": { "label": { "type": "string" }, "filename": { "type": "string" }, "content": { "type": "string" }, "mimeType": { "type": "string" }, "copyLabel": { "type": "string" }, "downloadLabel": { "type": "string" } } } }, "stats": { "type": "object", "additionalProperties": { "anyOf": [ { "type": "string" }, { "type": "number" } ] } } } } ``` ## Self-Contained JavaScript Source Call `runCleanUtilsTool(userInput)` with the user's input. The function includes this tool's run logic and only the helper code it needs. ```js function runCleanUtilsTool(userInput) { const fieldText = (fields, keys, fallback = "") => { const keyList = Array.isArray(keys) ? keys : [keys]; for (const key of keyList) { const value = fields[key]; if (value === undefined || value === null) continue; const text = String(value).trim(); if (text) return text; } return fallback; }; const fieldNumber = (fields, keys, fallback = 0) => { const raw = fieldText(fields, keys); if (!raw) return fallback; const parsed = Number(raw.replace(/[$,%\s]/g, "")); return Number.isFinite(parsed) ? parsed : fallback; }; const calculateBreakEven = (input) => { const fixed = fieldNumber(input, "fixed_costs", 0); const variable = fieldNumber(input, "variable_cost", 0); const price = fieldNumber(input, "price", 0); const targetProfit = fieldNumber(input, "target_profit", 0); const contribution = price - variable; const units = contribution > 0 ? Math.ceil((fixed + targetProfit) / contribution) : 0; const issues = contribution <= 0 ? [{ severity: "error", message: "Price must be greater than variable cost." }] : []; return { summary: contribution > 0 ? `${units.toLocaleString()} units needed to break even.` : "Break-even cannot be calculated with non-positive contribution margin.", issues, output: [ `Fixed costs: $${fixed.toFixed(2)}`, `Price: $${price.toFixed(2)}`, `Variable cost: $${variable.toFixed(2)}`, `Contribution per unit: $${contribution.toFixed(2)}`, `Break-even units: ${units.toLocaleString()}`, `Break-even revenue: $${(units * price).toFixed(2)}` ].join("\n"), exportFilename: "break-even.txt", stats: { units, contribution: contribution.toFixed(2) } }; }; const __userInput = userInput == null ? {} : userInput; const __run = (fields) => calculateBreakEven(fields); const __fields = __userInput && typeof __userInput === "object" && "fields" in __userInput && __userInput.fields && typeof __userInput.fields === "object" && !Array.isArray(__userInput.fields) ? __userInput.fields : (__userInput && typeof __userInput === "object" && !Array.isArray(__userInput) ? __userInput : {}); const __normalizedFields = Object.fromEntries(Object.entries(__fields).map(([key, value]) => [key, value == null ? "" : (["string", "number", "boolean"].includes(typeof value) ? value : String(value))])); return __run(__normalizedFields); } ``` ## Checks - Fixed costs: Setup, tooling, design, or launch costs are included before unit economics. - Variable cost: Per-unit cost is subtracted from price to find contribution margin. - Unit price: Price must be greater than variable cost or break-even cannot be calculated. - Target profit: Optional target profit increases the units required beyond simple cost recovery. - Simplified model: The calculator does not include taxes, refunds, shipping changes, inventory constraints, or tiered costs. ## Related Tools - [ROAS to ACOS Calculator](/business-tools/roas-acos-calculator/): Convert ad spend and revenue into ROAS, ACOS, and a margin-aware break-even reference. - [Gross Margin and Markup Converter](/business-tools/gross-margin-markup-converter/): Convert cost and price into gross profit, margin, markup, or reverse-calculated selling price.