1 Onset of sleep from time the lights were turned off; this is called  sleep onset latency  and normally is less than 20 minutes. ( 2 Note that determining sleep and awake is based solely on the EEG. Patients sometimes feel they were awake when the EEG shows they were sleeping.
The direct cost margin is calculated by taking the difference between the revenue generated by the sale of goods or services and the sum of all direct costs associated with the production of those goods, divided by the total revenue.
Calculating Gross Margin. Assume your revenue for a given month is $200,000. If your costs of goods sold are $120,000, your gross profit equals $80,000. To calculate your gross profit margin, you divide the $80,000 in gross profit by the $200,000 in revenue. The result is .4, which multiplied by 100 equals 40, or 40 percent. Thus, your gross margin for the period is 40 percent.