A macro is a series of recorded actions saved by a program to repeat later. Macros can help computer users save time by automating repetitive tasks. Some programs include built-in macro support to record and replay actions within that program, while other utilities can record and replay actions in other programs. Computer users can record their own macros or download and run macros from other sources.

A macro is similar to a script, as both contain a series of tasks for a program to run. While a script generally consists of program commands executed by a command line, a macro includes user interactions with parts of the screen. For example, a macro can record you entering a text in a text field, opening a menu, selecting a command, then clicking a button in a program window.

Office applications like Word and Excel include support for macros, allowing you to record a series of actions — entering a return address or formatting data in a certain way — and replay those actions with a single keyboard shortcut or button press. You can edit macros after recording them to add, remove, or modify steps. You can also write existing macros from scratch. Not all programs use the word "macro" to refer to recorded actions — for example, Photoshop allows you to record a series of commands that you can run from a menu but instead calls them "actions."

Some keyboards and mice designed for gamers and power users ship with software that allows you to record a macro, then assign it to a special key or button. Other software utilities let you record actions system-wide, then create a custom keyboard shortcut to trigger the macro that you can run no matter which program you're using.

NOTE: The word "macro" may also refer to macro photography, a method for taking photographs of a small object at close range.

Updated March 2, 2023 by Brian P.

quizTest Your Knowledge

What does a keylogger record?

Login attempts
Network packets
Correct! Incorrect!     View the Keystroke definition.
More Quizzes →

The Tech Terms Computer Dictionary

The definition of Macro on this page is an original definition written by the team. If you would like to reference this page or cite this definition, please use the green citation links above.

The goal of is to explain computer terminology in a way that is easy to understand. We strive for simplicity and accuracy with every definition we publish. If you have feedback about this definition or would like to suggest a new technical term, please contact us.

Sign up for the free TechTerms Newsletter

How often would you like to receive an email?

You can unsubscribe or change your frequency setting at any time using the links available in each email.

Questions? Please contact us.