There are many formulas, my advice is at a very early stage try to avoid the valuation.
If you are seeking a seed round, you can avoid the valuation question by structuring your investment via a convertible note (with or without a cap).
If you really want to assign a valuation (it will work against you). It will create a barrier for an investment.
If you really want to be 'fair', you can simply calculate how many people in the team x number of months/years x monthly salary.
ex. 3 founders x 6 months x $10k, your valuation is $180k.
You see this works against you and gives you very little.
If you see that money is strategic money (means that there is more then just money offered, ex. advice, business development etc...), then you should give more to the investor.
If you choose the path of raising money, remember that founders shares are the last one to be paid, and initially they do not have a real value until they are triggered by investment, customers, etc...traction.
At the VC stage, when you raise round A, assume that a VC typically wants 20-35%. The number varies on a number of factors. But for simple calculations think of the above number (30%). Note, a VC takes their money out first (liquidation preference) and has a participation preference.
If you are attracting co-founders, then its a different story.
Lets say an engineers makes $120k/year, you can offer them a salary (or not) of $30k and $150k of shares at a certain valuation.
There are many many ways to answer this question. It all depends if you are chasing money (investment) or if you are not.
Happy to answer any questions.