When you set up a line item, you enter some of the Rate and Cost values, while others are calculated for you.
Values You Enter

est net is the estimated CPM you expect to pay for 1000 impressions.

ad serving rate is the ad serving cost you expect to pay per 1000 impressions.

est margin is the margin you expect to charge, expressed as a percentage.

gross cost is the total you will pay for all impressions and ad serving fees.
Calculated Values

est imps shows the number of impressions you can expect to buy, given the rates and costs you've entered.
Calculated by: est imps = 1000 * [gross  (gross * est margin /100)] / (est net + ad serving rate)

est gross totals the est net and ad serving rates.
Calculated by: est gross = 1000 * gross / est imps

net is the expected net cost for the impressions alone (without ad serving fees)
Calculated by: net = (est net * est imps) / 1000

ad serving cost shows the expected total cost for ad serving.
Calculated by: ad serving cost = (ad serving rate * est imps) / 1000

est gain gives your estimated profit for the line item.
Calculated by: est gain = gross * est margin / 100
Example: No Margin
If a line item has gross costs of $1000, with no margin, estimated net rates of $4.50 CPM and $0.50 for ad serving:

est imps = 1000 * [gross  (gross * est margin /100)] / (est net + ad serving rate)
= 1000 * [$1000.00 ($1000.00 * 0)] / ($4.50 + $0.50)
= 1000 * [$1000.00 / $5.00]
= 200,000

est gross = 1000 * gross / est imps
= 1000 * $1000.00 / 200,000
= $5.00

net = (est net * est imps) / 1000
= $4.50 * 200,000 / 1000
= $900.00

ad serving = (ad serving rate * est imps) / 1000
= ($0.50 * 200,000) /1000
= $100.00

est gain= gross * est margin / 100
$1000.00 * 0 / 100
= $0.00
Example: Margin
If a line item has gross costs of $1000, with a 25% margin, estimated net rates of $4.50 CPM and $0.50 for ad serving:

est imps = 1000 * [gross  (gross * est margin /100)] / (est net + ad serving rate)
= 1000 * [$1000.00 ( $1000.00 * .25)] / ($4.50 + $0.50)
= 1000 * [$750.00 / $5.00]
= 150,000

est gross = 1000 * gross / est imps
= 1000 * $1000.00 / 150,000
= $6.6667

net = (est net * est imps) / 1000
= $4.50 * 150,000 / 1000
= $675.00

ad serving = (ad serving rate * est imps) / 1000
= ($0.50 * 150,000) /1000
= $75.00

est gain= gross * est margin / 100
$1000.00 * 25.00 / 100
= $250.00