Free & Instant — No Signup Required

Gross Margin Calculator

The Gross Margin Calculator computes the gross margin ratio from revenue and cost of goods sold (COGS). See your gross profit, gross margin percentage, and markup ratio instantly — essential for pricing decisions, profitability analysis, and financial reporting.

Gross Margin Calculator — Live Preview
Gross Margin
A
B
⚖️
Proportion Solver
A : B = C : D — Enter any 3 values
:
=
:
📊
Results
Visual ratio breakdown
Solved Proportion
Simplified
Percentages
Decimal
Fraction
Visual Ratio
A
B
Part A: —
Part B: —
    Ratio Simplifier
    Reduce any ratio to its simplest form
    :
    📊
    Simplified Result
    Reduced to lowest terms
    Simplified Ratio
    GCD Used
    Percentages
    Decimal Ratio
    Fraction
    Visual Ratio
    A
    B
    Part A: —
    Part B: —
      📐
      Ratio Scaler
      Multiply a ratio by a scale factor
      :
      ×
      📊
      Scaled Result
      Ratio after scaling
      Scaled Ratio
      Original
      Factor
      Percentages
      Simplified
      Visual Ratio
      A
      B

        🕐 Recent Calculations

        📭
        No calculations yet. Start computing above!

        What is Gross Margin?

        Gross margin is the ratio of gross profit to revenue, expressed as a percentage. Gross profit equals revenue minus cost of goods sold (COGS). A gross margin of 40% means that for every $1 in sales, the company retains $0.40 after covering direct production costs.

        Gross margin varies significantly by industry: software companies often exceed 80%, retail averages 25-50%, and grocery stores typically see 20-30%. Tracking gross margin helps businesses set prices, control costs, and benchmark against competitors.

        Formulas & Equations Used

        This Gross Margin Calculator uses the following core equations:

        1 Gross Margin Percentage
        Gross Margin % = ((Revenue - COGS) / Revenue) × 100

        Revenue of $500,000 with COGS of $300,000: Gross Margin = ($200,000 / $500,000) × 100 = 40%.

        2 Gross Profit
        Gross Profit = Revenue - COGS

        Revenue $500,000 - COGS $300,000 = Gross Profit $200,000.

        3 Markup Percentage
        Markup % = ((Revenue - COGS) / COGS) × 100

        With $200K profit on $300K COGS: Markup = ($200K / $300K) × 100 = 66.7%. Note: markup and margin are different calculations.

        How to Use This Gross Margin Calculator

        Follow these 3 simple steps:

        1

        Enter Your Values

        Type the known values into the input fields above. The Gross Margin Calculator accepts any positive numbers.

        2

        Choose Calculation Mode

        Select Solve, Simplify, or Scale mode in the calculator. Each applies different equations to your inputs.

        3

        View Results

        Click Calculate to see your answer with a visual ratio bar, pie chart, and step-by-step solution breakdown.

        Example Problems & Step-by-Step Solutions

        Here are 3 worked examples using this Gross Margin Calculator:

        Example 1 Revenue $250,000 and COGS $150,000
        1 Gross Profit = $250,000 - $150,000 = $100,000
        2 Gross Margin = ($100,000 / $250,000) × 100 = 40%
        3 Markup = ($100,000 / $150,000) × 100 = 66.7%
        Gross Margin: 40%, Markup: 66.7%
        Example 2 Product costs $12 to make, sells for $30
        1 Gross Profit = $30 - $12 = $18
        2 Gross Margin = ($18 / $30) × 100 = 60%
        3 Markup = ($18 / $12) × 100 = 150%
        60% margin with 150% markup
        Example 3 Target 35% margin, COGS is $65
        1 Revenue = COGS / (1 - Margin)
        2 Revenue = $65 / (1 - 0.35)
        3 Revenue = $65 / 0.65 = $100
        Sell at $100 to achieve 35% gross margin

        Frequently Asked Questions

        What is the difference between gross margin and net margin?

        Gross margin only subtracts COGS from revenue. Net margin subtracts ALL expenses (COGS, operating costs, taxes, interest). Gross margin is always higher than net margin because it excludes overhead costs.

        What is a good gross margin percentage?

        A 'good' gross margin depends on industry. Software/SaaS: 70-90%. Retail: 25-50%. Manufacturing: 25-40%. Food service: 55-65%. Compare against industry benchmarks rather than an absolute number.

        How is gross margin different from markup?

        Gross margin divides profit by revenue (selling price). Markup divides profit by cost. A 50% margin equals a 100% markup. A 33.3% margin equals a 50% markup. They describe the same profit from different perspectives.

        How do I improve gross margin?

        Increase prices, negotiate lower supplier costs, reduce waste in production, switch to higher-margin products, or improve manufacturing efficiency. Even small margin improvements compound across volume.

        Can gross margin be negative?

        Yes. Negative gross margin means the company sells products for less than they cost to make (COGS exceeds revenue). This is unsustainable long-term but may occur during market entry, liquidation, or loss-leader strategies.

        Learn About Ratios

        What is a ratio?

        A ratio is a comparison between two or more quantities showing the relative size of one to another. Written as A : B, it means 'for every A units of the first quantity, there are B units of the second.' For example, a ratio of 3 : 4 means for every 3 parts of A, there are 4 parts of B. Ratios are used in cooking, construction, finance, science, and everyday life.

        How do I solve a proportion?

        A proportion is an equation that says two ratios are equal: A : B = C : D. To solve for a missing value, use cross-multiplication. If D is unknown: D = (B × C) / A. This works because in equal ratios, the cross products are always equal: A × D = B × C. Our Proportion Solver does this automatically — just enter any 3 values and it finds the 4th.

        How do I simplify a ratio?

        To simplify a ratio, find the Greatest Common Divisor (GCD) of both numbers and divide each by it. For example, 24 : 36 — the GCD of 24 and 36 is 12. So 24 ÷ 12 = 2 and 36 ÷ 12 = 3, giving the simplified ratio 2 : 3. Our Simplifier automatically finds the GCD and reduces your ratio to its lowest terms.

        What is ratio scaling and when is it useful?

        Scaling a ratio means multiplying both parts by the same factor to create an equivalent, larger (or smaller) ratio. For instance, scaling 2 : 5 by a factor of 3 gives 6 : 15. This is extremely useful for recipes (tripling a recipe), construction (scaling blueprints), mixing solutions, or any scenario where you need to maintain the same proportion at a different magnitude.

        What's the difference between a ratio and a fraction?

        A ratio A : B compares two quantities to each other (part-to-part), while a fraction A/B typically represents a part-to-whole relationship. However, any ratio can be expressed as a fraction: 3 : 4 is equivalent to 3/4 = 0.75. The key difference is context — ratios compare quantities side-by-side, while fractions represent a portion of a total.