Where is the comma on the keyboard?
Below is an overview of a computer keyboard with the , (comma) key highlighted in blue.
How to create a comma
Creating the "," symbol on a U.S. keyboard
On English PC and Mac keyboards, the comma is on the same key as the less than symbol. Pressing the , key with no other key creates the comma symbol.
Create a "," symbol on a smartphone or tablet
What is a comma used for on a computer?
Comma in programming
The comma is used in programming as an operator to separate values or elements. For example, in Perl, you could declare multiple variables in one line by separating each of the variables with a comma, as shown below.
my ($example, $computer, $hope);
Comma in numbers
When dealing with numbers, in a calculator, or programs like Microsoft Excel, a comma style is setting that group's numbers. For example, instead of showing "1000000", it would show "1,000,000" with comma style enabled. To enable the comma style in Microsoft Excel, in the Home tab, click the comma icon.
A comma in the date
When writing out the date with the month, date, and year the comma is used to separate the date from the year. For example, May 5, 2020, separates the date (5) from the year (2020).
A comma in a CSV
A CSV is short for comma-separated value and describes a type of file storing data that's separated by commas. See our CSV page for further information and help.
What comes after a comma?
When typing a sentence that uses a comma, a space follows a comma. However, if that comma is in a number, as shown above, it may be followed by a number.
What is the other symbol on the comma key?
On U.S. keyboards, the , key is shared with the < (less than) key, which may be shown next to or above the comma symbol. To create the less than symbol, hold down the Shift key while also pressing the , key.