A calculator is an electronic device or software that performs mathematical calculations, ranging from basic arithmetic to complex functions. It works by taking user input through buttons and displaying the results on a screen, and modern versions are often built into computers, smartphones, and tablets.