Profit Margin Calculator: Revenue, Cost & Gross Margin

Use this gross profit margin calculator with revenue and cost of goods sold to calculate gross profit and profit margin, or work backward from a target margin. It is useful for products, services, ecommerce orders, and business pricing checks.

Gross margin formula
Profit margin = (Revenue - COGS) / Revenue x 100

Profit Margin Calculator

Real-time
Choose the missing value, then enter the revenue, COGS, profit, or target margin you already know.
$
Total sales revenue for the period or order before subtracting the cost of goods sold.
$
Direct product, material, or delivery cost tied to the revenue you entered.
$
%
Profit margin
-
Gross profit
-
Revenue
-
COGS
-
Revenue breakdown

Profit Margin Calculator Results

Gross profit margin, margin formula, and revenue-to-cost breakdown.
Revenue
-

The total sales amount used as the denominator for the gross margin calculation.

Cost of goods sold
-

Direct cost associated with making or delivering the product or service.

Gross profit
-

Revenue minus COGS, before operating expenses, taxes, interest, and other overhead.

Gross profit margin
-

Gross profit expressed as a percentage of revenue.

COGS ratio
-

COGS expressed as a percentage of revenue.

Result type
-

Shows whether the inputs produce a gross profit or a gross loss.

Profit margin formula used

-

How to read this result

    Profit Margin Calculator Examples

    Load a practical scenario to see how revenue, direct cost, gross profit, and margin move together.

    Ecommerce product with 40% margin

    A $72 direct cost and $120 revenue create $48 gross profit and a 40% gross margin.

    Service project margin check

    A $2,500 project with $1,500 in direct delivery cost leaves $1,000 gross profit before overhead.

    Find COGS for a 30% target

    At $1,000 revenue, a 30% gross margin allows $700 of COGS and leaves $300 gross profit.

    Sale price below direct cost

    A $45 sale with $55 COGS produces a $10 gross loss and a negative 22.22% margin.

    How to Use This Profit Margin Calculator

    Keep revenue, direct costs, and profit on the same order, product batch, or reporting period so the percentage is meaningful.

    1

    Choose the value to solve

    Select margin or profit when revenue and COGS are known. Select revenue or COGS when you are working backward from a target margin.

    2

    Enter comparable values

    Enter total revenue before the direct costs you want to subtract. Use COGS for materials, inventory, or direct delivery costs, not rent or general overhead.

    3

    Calculate the result

    The tool returns gross profit, gross margin, COGS ratio, and a formula you can check line by line.

    4

    Review the business boundary

    Treat the result as gross margin. Add operating expenses, taxes, interest, payment fees, shipping, and returns before estimating net profit.

    Gross Profit Margin Examples

    Use these quick examples to sanity-check the relationship between revenue, direct cost, profit, and margin.

    Scenario Revenue COGS Gross profit Margin
    Retail product $100.00 $60.00 $40.00 40.00%
    Online service $500.00 $325.00 $175.00 35.00%
    Wholesale order $2,000.00 $1,500.00 $500.00 25.00%
    Clearance sale $45.00 $55.00 -$10.00 -22.22%

    These examples measure gross margin only. A business can have a positive gross margin and still report a net loss after operating expenses.

    Profit Margin Formula

    Profit margin uses revenue as the base. That is different from markup, which uses cost as the base.

    Gross profit

    Gross profit = Revenue - COGS

    Subtract direct product or delivery costs from revenue.

    Gross margin

    Margin % = Gross profit / Revenue x 100

    This is the main formula used by the calculator.

    Revenue from a target margin

    Revenue = Gross profit / (Target margin / 100)

    Use a positive known gross profit and target margin.

    COGS from a target margin

    COGS = Revenue x (1 - Target margin / 100)

    This estimates the maximum direct cost for a target gross margin.

    Profit Margin vs Markup

    Both percentages describe profit, but they answer different pricing and reporting questions.

    Question Profit margin Markup
    What is the base? Revenue or selling price Cost
    Core formula Profit / Revenue Profit / Cost
    Best use Measure gross profitability Set a price from a known cost
    Example $40 profit / $100 revenue = 40% $40 profit / $60 cost = 66.67%

    If you need to price an item from its cost and a target markup, use the separate Markup Calculator.

    When to Use a Profit Margin Calculator

    A gross margin check is useful whenever you need to compare direct cost against the money earned from a sale or project.

    Ecommerce products

    Check a product's gross margin before separately accounting for marketplace fees, fulfillment, advertising, returns, and shipping.

    Service quotes

    Compare project revenue with direct labor, materials, subcontractors, or delivery costs before estimating the final business profit.

    Wholesale orders

    Test whether a discount or volume price still leaves enough gross profit for the order size and direct fulfillment cost.

    Business planning

    Use target margin and revenue to estimate an allowable direct-cost budget, then compare it with a break-even plan.

    Profit Margin Calculator Edge Cases

    The result is only as useful as the definitions and time periods behind the numbers.

    Zero revenue

    Margin cannot be calculated when revenue is zero because revenue is the denominator. Enter a real sales amount or use the profit result alone.

    Negative profit

    A negative margin means direct costs are higher than revenue. It can occur during clearance, returns, underquoted work, or a data mismatch.

    Gross vs net margin

    This tool calculates gross margin from revenue and COGS. Net margin also subtracts operating expenses, taxes, interest, and other non-direct costs.

    Mixed periods

    Do not compare one month of revenue with a quarter of COGS. Use matching products, orders, dates, and accounting definitions.

    Profit Margin Calculator FAQ

    Direct answers about gross margin, profit margin formulas, COGS, markup, and net profit.

    Subtract COGS from revenue to find gross profit, divide gross profit by revenue, and multiply by 100. For example, $40 gross profit divided by $100 revenue equals a 40% gross margin.

    Gross margin subtracts direct costs such as inventory or materials from revenue. Net margin also subtracts operating expenses, payroll, rent, software, taxes, interest, marketing, and other costs. This calculator reports gross margin.

    There is no universal target. A useful margin depends on the industry, pricing model, operating costs, growth plan, returns, payment fees, and capital requirements. Compare the result with your own break-even point and historical results rather than using one generic benchmark.

    Yes. A negative gross margin means COGS is higher than revenue for the values entered. Check whether a discount, refund, shipping cost, or underquoted project caused the direct loss.

    Multiply revenue by one minus the target margin as a decimal. At $1,000 revenue and a 30% target gross margin, the maximum COGS is $1,000 × (1 - 0.30) = $700.

    No. Margin uses revenue as the base while markup uses cost. A $60 cost and $100 selling price produce $40 profit, which is a 40% margin but a 66.67% markup. Use the Markup Calculator when the main task is setting a selling price from cost.

    No. It calculates gross profit and gross margin from the revenue and COGS you enter. Add tax, payroll, rent, advertising, payment processing, shipping, interest, and other overhead separately when estimating net profit.

    Use it as a gross profit margin calculator, not a full net margin model. A net profit margin calculator must also subtract operating expenses, taxes, interest, payroll, rent, marketing, payment fees, and other costs that are not included in COGS.

    Use direct costs that are tied to making or delivering the revenue in the same period, such as inventory, materials, direct production labor, or project-specific subcontractors. Keep general overhead outside COGS if you want a gross-margin view.

    Check Your Gross Profit Margin

    Enter matching revenue and direct-cost figures above, then use the result as a starting point for your full business profitability review.