Formulas don't calculate as formulas in Excel because they're not programmed to do so. Instead, they're programmed to calculate as values. This is why you'll often see a formula result that's different from what you expect it to be.
To fix this, you need to use the correct syntax for your formula. For example, if you want to add two numbers together, you would use the plus sign (+). If you want to subtract one number from another, you would use the minus sign (-). And so on.
You can also use parentheses to control the order of operations in your formulas. For example, the formula (2+3)*4 would first add 2+3 together, and then multiply that result by 4. But if you wanted to multiply 2 and 3 first, and then add 4 to that result, you would use the formula 2*(3+4).
Once you have the correct syntax for your formula, you need to make sure that all of the cells referenced in the formula are correctly formatted as numbers. If any of them are formatted as text, the formula will not work correctly. To change the format of a cell, select it and then go to the Home tab > Number group > choose the appropriate number format.
If your formula still isn't calculating correctly after checking all of these things, there might be an error in one of the cells referenced by the formula. To check for errors, select the cell with the formula and then go to the Formulas tab > Formula Auditing group > Error Checking button. This will show you any errors in the cells referenced by your formula.