If you are developing software, then this actually becomes a bit of a nitch area in the tax law. You have business organizational and start-up costs here, research and development costs (tax credits!!), capitalizable costs for your cost of sales (can get complex for tax purposes...), and frankly, you're not going to get an exact answer on this website I believe, but I'll give you some clarity.
In general, you have a cost of sales component, yes. When you go to sell the software, you will look to recoup some of your development costs, which must be capitalized in the meantime, yes.
What you need to do, aside from spending hours and hours of your time figuring this stuff out, is hire a professional (My base fee for consulting in this area is going to start at around $250, depending on your situation, for tax purposes, and that's not going to include actual forms preparation or financial statements...).
Let me know if you need more clarification.
Thank you for your question.