When a computer performs calculations, it temporarily holds the data it is working on in its memory — specifically the RAM (Random Access Memory). RAM acts as the machine's short-term workspace, storing the numbers, instructions, and intermediate results the processor (CPU) needs to reach almost instantly.
Unlike a hard drive or SSD, which keep files permanently even with the power off, RAM is volatile: everything in it vanishes the moment the machine shuts down. That's why unsaved work disappears during a power cut. In short, the CPU does the calculating, and RAM is where the data lives while that work is happening.