How to use AI features in Google Sheets
Learn how to use the AI function in Google Sheets to generate text, summarize data, categorize entries, and analyze sentiment.

Quick answer
Type =AI( into any cell, then write a prompt referencing your data range, like =AI("Summarize this feedback:", A2:A10). Press Enter to generate a response. The AI function requires an eligible Google Workspace plan with Gemini or a Google AI Pro/Ultra subscription, and works alongside your existing formulas and data.
Steps at a glance
- Confirm your account has Gemini access through Workspace or Google AI plan
- Open a spreadsheet and select an empty cell
- Type =AI( followed by your prompt in quotes
- Reference a cell or range to give the AI context
- Press Enter to generate the response
- Drag the fill handle to apply the formula to other rows
- Review and edit generated text as needed
Summary
The AI function in Google Sheets lets you generate text, summarize information, categorize data, and analyze sentiment directly inside a formula. It uses Gemini's language models to process prompts alongside your spreadsheet data, so you get useful output without leaving the grid.
Step-by-step guide
Step 1
Check that you have access
The AI function only works with an eligible Google Workspace plan that includes Gemini, or a Google AI Pro or Ultra subscription. If you're on a standard free personal Google account without one of these plans, the =AI( formula won't be available in your version of Sheets.
Step 2
Open your spreadsheet and pick a cell
Open the Google Sheet you want to work in and click an empty cell where you want the AI-generated result to appear. It helps to keep this cell in the same row as the data you want the AI to reference, similar to how you'd set up a formula when you add columns for calculations.
Step 3
Enter the AI formula with your prompt
Type =AI( into the cell, followed by your instruction in quotation marks, such as "Summarize the key complaint in this review:". Close the parentheses and press Enter to run the formula.
Step 4
Reference your data for context
Add a cell reference or range after your prompt text so the AI has something to work with, for example =AI("Summarize:", B2). This tells Gemini to pull in the actual content from that cell when generating its response.
Step 5
Choose the right task type
Adjust your prompt wording depending on what you need: ask it to generate text, summarize a block of information, categorize entries into groups, or analyze sentiment as positive, negative, or neutral. Being specific in the prompt produces more consistent, usable results across rows.
Step 6
Apply the formula to more rows
Once the first result looks right, click the cell and drag the fill handle down to apply the same AI formula to the rest of your rows. Each row will generate its own response based on the data in that row, similar to copying a standard formula down a column.
Step 7
Review and refine the output
Read through the generated text and edit any cells where the response needs adjusting. If results feel too generic, go back and make your prompt more specific about tone, length, or the exact categories you want.
Why this matters
You've got a column of customer comments, survey responses, or product descriptions and no time to read through each one manually. Using the AI function lets you summarize, tag, or score that data in bulk, turning raw text into structured insight without copying anything into a separate chat tool.
Frequently asked questions
Is the AI function free to use in Google Sheets?
No. It requires an eligible Google Workspace plan with Gemini included, such as Business Standard or Plus, or a separate Google AI Pro or Ultra subscription. It is not part of the standard free personal Google account.
Can the AI function access real-time information?
Yes, in supported plans the AI function can pull in real-time information from Google Search to inform its response, in addition to analyzing the data already in your spreadsheet.
Can I use the AI function alongside regular formulas?
Yes. The AI function behaves like any other formula, so you can combine it with functions such as [IF](/guides/google-sheets/use-if-formula) or reference ranges the same way you would when you [sort a table](/guides/google-sheets/sort-a-table) or filter results.
Does the AI function work on imported data?
Yes. Once you [import a CSV](/guides/google-sheets/import-csv) or paste in external data, you can run the AI function on those cells just like any native spreadsheet content.
Create interactive demos like this one — free, no coding required.
Start for free →