Comment by jlokier
Not when it comes to capital assets. The full cost of a large capital asset is generally not allowed to be treated as an expense for tax purposes.
It's technically correct that tax is levied on "net income", but that's an accounting term which means something different from "money_in - money_out" when there are capital assets.
One justification for this is, although you spent the cost, you received equivalent value in the form of the asset itself.
This means if it costs $100k in salary to make software this year, and you get $30k in income from the software this year, your bank balance will lose $70k (which is expected) and you'll have negative income in the ordinary way of thinking, but you'll be charged income tax (which is new) despite losing money, as if you gained (almost) $30k instead of losing $70k.
Your tax accounts will show an increase in net assets, despite the decrease in your bank balance, because they will show the software as being "worth" (almost) $100k, regardless of what it's really worth right now.
This is particularly hard if you're a small company or (non-VC-funded) startup that's already stretching to cover the cost of speculative software development. Being charged income tax even while you're losing money developing software (in the ordinary way of thinking about money) is what's new in the tax code. It makes it harder than before to do speculative developments, making some kinds of development non-viable that were viable before.