make cell invisible, but still calculate
Menu Format - Merge Cells - Merge and Center Cells - Keep the contents of the hidden cells (there is a button in the Formatting toolbar).
B1: =A1+A2
You can hide only complete rows or columns, so set the colour of the text/result in the cell to the same colour as the background…
… or use a custom cell format that would output empty string for any data (numbers and text):
;;;
(would still output in case of an error)
The above methods show the content of the cell in the formula bar.
If your goal is to hide the contents of a sheet cell from the user, then in the “Format Cells” dialog, “Cell Protection” tab, check the “Hide all” box and protect the sheet.