• TC is the total cost ($) • LC is the number of lines of code To calculate Cost Per Line of Code, divide the total cost of the work by the number of lines of code. ## How to Calculate Cost Per Line of Code? The following steps outline how to calculate the Cost Per Line of Code. 1. First, determine the total cost ($).
2. Next, determine the number of lines of code.
3. Next, gather the formula from above = CPLC = TC / LC.
4. Finally, calculate the Cost Per Line of Code.
5. After inserting the variables and calculating the result, check your answer with the calculator above.

Example Problem :

Use the following variables as an example problem to test your knowledge.

total cost (\$) = 5,000

number of lines of code = 150