Skip to content

cal command in MacOS

The cal command in MacOS is used to display a monthly calendar in the terminal. It shows the current month by default or lets you specify a different month and year. The cal command also allows you to display a calendar for an entire year or a specific day of the week. This powerful tool is a convenient way to quickly check dates and plan ahead directly from the command line.

cal Syntax:

Terminal window
cal [month] [year]

MacOS cal Options:

OptionDescription
-3Display previous, current, and next month’s calendar

cal Parameters:

ParameterDescription
monthSpecify a month (1-12)
yearSpecify a year

Display the Calendar for the Current Month

Terminal window
cal

Displays the calendar for the current month.

Display the Calendar for a Specific Month in a Year

Terminal window
cal 12 2022

Displays the calendar for December 2022.

Display the Calendar for a Specific Year

Terminal window
cal -y 2023

Displays the calendar for the year 2023.

Display the Calendar for a Specific Month and Year

Terminal window
cal 6 2022

Displays the calendar for June 2022.

Display the Julian Calendar for a Specific Year

Terminal window
cal -j 2022

Displays the Julian calendar for the year 2022.

Display the Calendar in an Alternate Format

Terminal window
cal -3

Displays the calendar for the given month with the previous, current, and next month.

Display the Calendar Highlighting Today’s Date

Terminal window
cal -h

Displays the calendar highlighting today’s date.

Display a Specific Number of Months from the Current Month

Terminal window
cal -A 3

Displays the calendar for the current month along with the next 3 months.

How do I use cal in MacOS?

To use the cal command in MacOS, execute the following command:

Terminal window
cal

How can I display a specific month in the calendar with cal in MacOS?

To display a specific month in the calendar using the cal command in MacOS, you can specify the month and the year like this:

Terminal window
cal 12 2022

How do I show a specific year calendar using cal in MacOS?

To show the calendar for a specific year using the cal command in MacOS, provide the year as an argument:

Terminal window
cal 2023

Can I highlight the current day in the cal output in MacOS?

To highlight the current day in the cal output in MacOS, you can use the command with the -h option like this:

Terminal window
cal -h

How do I display a calendar for a specific month with a specific starting day in MacOS?

To display a calendar for a specific month with a specific starting day using the cal command in MacOS, you can specify the month, year, and day like this:

Terminal window
cal 4 2024 -m

How can I show the calendar for a specific month in a different format using cal in MacOS?

To show the calendar for a specific month in a different format using the cal command in MacOS, you can use the -y option to display the year alongside the month like this:

Terminal window
cal -y 6 2025

How do I get the cal command to display Monday as the first day of the week in MacOS?

To get the cal command to display Monday as the first day of the week in MacOS, you can use the -m option to start the week on Monday like this:

Terminal window
cal -m

Can I display a specific month’s calendar with week numbers using cal in MacOS?

To display a specific month’s calendar with week numbers using the cal command in MacOS, you can use the -w option like this:

Terminal window
cal -w 8 2026

Applications of the cal command

  • Display a calendar for the current month
  • Display a calendar for a specific month and year
  • Provide an overview of the days of the week and dates for a given month