There are stuffs like this in the internet...
1.find out your COGS (cost of goods sold). For example $30.
2.find our your revenue (how much you sell these goods for, for example $50).
3.calculate the gross profit by subtracting costs from revenue. $50 - $30 = $20
4.divide gross profit by revenue: $20 / $50 = 0.4.
5.express it as percentages: 0.4 * 100 = 40%.
6.this is how you calculate profit margin... or simply use our gross margin calculator!
https://www.omnicalculator.com/business/margin