Back to all articles

How to calculate margin on digital products?

How to calculate margin on digital products?

November 12, 2026

You sell an e-book for 99 PLN and see your first orders. Great, but sales alone don't tell you how much your business actually retains. If you don't know how to calculate margin, you can increase your turnover while simultaneously handing over profits to advertising, commissions, and affiliate partners without fully controlling the outcome.

The good news is that with digital products, the math is simpler than with many other business models. You don't have the cost of creating another copy of a file, but you do have the costs of customer acquisition, payment processing, commissions, returns, updates, and time. The margin shows whether the product price covers all of this with room to spare for development.

What is margin and what does your score say?

Margin is the percentage of revenue that remains after subtracting selling costs. So, you're not just looking at how much the product cost you, but also at the ratio of profit to the amount the customer paid.

The pattern looks like this:

margin = (sales revenue - costs) / sales revenue × 100%

If a customer pays PLN 100 and all costs attributed to that sale are PLN 30, you are left with PLN 70. Your margin is 70%.

This metric allows you to make specific decisions. You can see if you can increase your affiliate commission, the maximum amount you can pay to acquire a buyer, and whether a price promotion still makes sense. Without this number, you're relying on intuition. And intuition can be expensive, especially when you increase your advertising budget.

How to calculate the margin on a course, e-book, and template

Let's assume you're selling an online course for PLN 199. For a single transaction, you'll assign PLN 12 for payment and sales processing fees, PLN 35 for advertising costs, and PLN 30 for affiliate commission. The total cost per sale is PLN 77.

The counting is simple:

(199 PLN - 77 PLN) / 199 PLN × 100% = 61.3%

For each sale, you're left with PLN 122 before costs you don't allocate to a single transaction, such as preparing materials, editing lessons, or supporting clients. The transaction margin is 61.3%, giving you a baseline for further scaling.

Now consider the second scenario. You run a promotion and lower the course price to PLN 149. The advertising, service, and affiliation costs remain the same – PLN 77. This leaves PLN 72, meaning your margin drops to 48.3%. Sales may increase, but if they don't increase enough, the promotion will take away more profit than it generates in additional sales.

This doesn't mean you should never lower your prices. A promotion can help you gather initial reviews, launch a campaign to a new group, or increase the number of customers to whom you can later sell more products. However, you should base this decision on numbers, not just because your competitor has posted a discount code.

Include costs that really depend on sales

Digital offerings often overlook costs that don't reflect the cost of the product. This is a mistake. When calculating a single order, include the transaction commission, advertising costs attributed to the sale, affiliate commission, returns, and additional service if the customer purchases a package with a consultation or access to a private community.

If you sell through affiliates, don't consider their commissions a problem. They're the cost of acquiring a customer who has already trusted the referrer. The problem begins when you set your affiliate rate without knowing your margin. On a 49 PLN product, a 50% commission may leave too little room for payments, retargeting ads, and refunds. At a 499 PLN rate, the same rate may still be profitable.

The cost of creating an e-book or course also matters, but analyze it separately. If you spent 6,000 PLN on product development and only have 120 PLN left over from a single sale, you need 50 sales to recoup your investment. From the 51st sale, you start building profits beyond the cost of creation. This gives you a realistic campaign goal, not a vague "I'll sell as many as I can."

Margin and markup - the difference that spoils the calculations

Margin and markup are not the same, although many people use the terms interchangeably. Margin relates profit to selling price. Markup relates profit to cost.

Let's assume your cost is PLN 60 and your selling price is PLN 100. Your profit is PLN 40. Your margin is 40% because you divide PLN 40 by PLN 100. Your markup is 66.7% because you divide PLN 40 by the cost of PLN 60.

Why does this matter? Because if you say to yourself, "I want a 50% margin," and set your price by adding 50% to your cost, you won't achieve a 50% margin. At a cost of 100 PLN, the price after adding 50% is 150 PLN, and the margin is only 33.3%.

If you want to set a price for a specific margin, use a different formula:

selling price = cost / (1 - planned margin)

You have a cost of PLN 80 and aim for a 60% margin. Divide 80 by 0.4. The price should be PLN 200. That leaves PLN 120, or exactly 60% of the price.

Don't count one margin for the entire business

The average margin of the entire business can mask a problem. You might have a highly profitable template for 39 PLN sold to your own database, and a course for 399 PLN, whose advertising consumes most of the money. The average result looks good, while one product is easily eating into your budget.

Calculate the margin separately for each product, sales channel, and campaign. An e-book sold through a newsletter typically has a different cost than the same e-book purchased through advertising. A course recommended by an affiliate may have a lower margin on the first transaction, but a higher customer lifetime value if they subsequently purchase additional materials without the affiliate's commission.

Three levels of control are useful. First, you check the margin on a single order. Then, you analyze the product margin for a given month, taking into account advertising and returns. Finally, you look at how much is left after fixed costs, such as producing new lessons, tools, or employee salaries.

This breakdown protects you from a common trap: the product has a good margin "on paper," but the advertising campaign generates sales at too high a price. Once you know the break-even point, you can quickly disable the ad, change the creative, or raise the price instead of burning through the budget for weeks.

Increase margins without cutting the value of your offer

The easiest response to a low margin is to raise your price. Sometimes that's a good move, especially when the offer solves a specific, expensive problem. But before you raise your price, make sure you're not leaving money on the checkout itself.

Add an order bump, a simple add-on purchased with a single check. You can add a package of 30 ready-made prompts or a publishing calendar to your content planning e-book for 19-29 PLN. This product doesn't require an additional sales conversation and increases the average cart value. If the cost of shipping the add-on is close to zero, its margin will be very high.

The second step is bundling. Instead of selling three templates for 29 PLN, create a set for 69 PLN and clearly demonstrate the savings the customer receives compared to purchasing individual items. This way, you don't underestimate value, but increase revenue per customer.

The third step is affiliate marketing. Provide your affiliate with a ready-made product description, three images, and a specific link to your sales page. Send a direct message to five creators working in your niche, offering a clear commission rate and trial access. Fewer accidental clicks mean better sales and a lower customer acquisition cost.

If you're selling to customers outside of Poland, don't manually convert everything to Polish złoty. Pricing in EUR or USD may be more relevant to your market, and selling in multiple currencies helps maintain a clear value proposition. However, keep an eye on the margin separately for each currency and campaign, as the cost-per-click and offer effectiveness will vary.

Set up a simple sheet that shows the truth

You don't need a complex financial monster. For each product, prepare a table with price, number of sales, transaction commissions, advertising expenses, affiliate payouts, refunds, and product development costs. Update it weekly, not just at the end of the month, when it's hard to reverse a bad decision.

First, enter actual data, not assumptions. If you spent 1,500 PLN on advertising and acquired 30 customers, the cost per customer is 50 PLN. Don't assume it "should" be 25 PLN just because that was the plan. The numbers are there to help you make money, not to confirm a previous opinion.

A well-configured sales process gathers this data without manually retyping orders. When payment, instant file access, invoicing, affiliate commission calculation, and analytics all work in one process, you can quickly see which channel is truly driving profit. This is especially important as the number of products and affiliates grows.

It's your turn to move

Don't wait for your turnover to grow to start calculating your margin. Open your data from the last 30 days, select your best-selling product, and calculate the profit per transaction. Then, see how much your profit increases after adding a 29 PLN bonus or changing your partner's commission by a few percentage points.

If you want to sell digital products without manually managing orders, NetBiznes lets you combine checkout, automatic file downloads, invoicing, analytics, and affiliate commissions in one place. Sign up during the promotional period for reduced commissions, set your prices, and then manage your business on margin, not guesswork.