Profit margin is a financial ratio that represents the percentage of revenue that a company retains as profit after accounting for all costs and expenses. It is calculated by dividing the net income (profit) by the total revenue generated, and multiplying the result by 100 to express it as a percentage.

The formula for calculating profit margin is:

Profit Margin = (Net Income / Total Revenue) x 100

**Example:**

Company generates $1 million in revenue and has $600,000 in expenses, resulting in a net income of $400,000. To calculate the profit margin, we would divide the net income by the total revenue, and multiply by 100:

Profit Margin = ($400,000 / $1,000,000) x 100 = 40%

This means that the company has a 40% profit margin, which is relatively high and suggests that the company is generating a significant amount of profit relative to its revenue.

It's worth noting that profit margins can vary widely across industries and companies, so it's important to compare a company's profit margin to its peers or industry benchmarks to get a better understanding of how it is performing.