Free tools / Spreadsheet functions
Spreadsheet functions for SEO and AI search research
Our spreadsheet functions add eight research formulas to Google Sheets, such as =BW_TOKENS, =BW_GRADE and =BW_ROBOTS, built from the same rules as our free tools. Download the Apps Script file, paste it into your sheet and use the functions on whole columns; the file calls no outside service. Plain formulas for any spreadsheet are below.
The functions runs in this page. Nothing you enter is sent to our server. The Apps Script file is built in your browser.
No email is needed, and nothing you paste is stored. A shared result stays in its link, not on our server.
What we check and why
The functions
BW_WORDS(text): Word count, the same rule as our readability and token tools.BW_TOKENS(text, "characters" or "words"): Token estimate: characters / 4 or words x 1.33, rounded up.BW_GRADE(text): Flesch-Kincaid grade with our published syllable and sentence rules.BW_TITLE_WIDTH(text, font size): Width in pixels with standard Arial widths; a desktop title has about 600 px.BW_QUERY_TYPE(query): Comparison, alternatives, pricing, best-of or question, by the word rules of our opportunity scanner.BW_CRAWLER(user agent): The crawler a user agent names, from our published crawler list.BW_DOMAIN(address): Host name without www.BW_ROBOTS(robots.txt text, agent, path): Allowed, disallowed or no rule, matched as RFC 9309 sets out.Install in Google Sheets
Open your spreadsheet, choose Extensions, then Apps Script. Paste the file, save it, and use the functions in any cell, for example =BW_WORDS(A2). Each accepts a whole range, such as A2:A500.
No outside calls
The functions read just the cells you pass to them and call no outside service, so your data stays in your spreadsheet.
Plain formulas
For any spreadsheet, without a script: Words (any spreadsheet):
=IF(LEN(TRIM(A2))=0,0,LEN(TRIM(A2))-LEN(SUBSTITUTE(TRIM(A2)," ",""))+1); Tokens, characters / 4 (any spreadsheet):=ROUNDUP(LEN(A2)/4,0); Tokens, words x 1.33 (any spreadsheet):=ROUNDUP((LEN(TRIM(A2))-LEN(SUBSTITUTE(TRIM(A2)," ",""))+1)*1.33,0); Host name (Google Sheets):=REGEXEXTRACT(A2,"^(?:https?://)?(?:www\.)?([^/:?#]+)"); Reads as a question (Google Sheets):=REGEXMATCH(LOWER(A2),"^(who|what|when|where|why|how|which|can|does|do|is|are|should)\b").
Questions
How do I add custom functions to Google Sheets?
Open your spreadsheet, choose Extensions and then Apps Script, paste the file and save it. The functions then work in any cell of that spreadsheet, for example =BW_WORDS(A2), and accept whole ranges such as A2:A500.
Do these functions call an API or send my data anywhere?
No. They read just the cells you pass to them and call no outside service, so your data stays in your spreadsheet and they cost nothing to run.
Do they work in Excel?
The Apps Script file is for Google Sheets. The plain formulas for words and tokens work in Excel and Google Sheets alike; the host name and question formulas use Google Sheets REGEX functions.
Want the fix made for you?
Answer Repair completes one agreed source-backed page or fix. Choose Live or Handoff before payment. Due 48 elapsed hours after Ready. Full refund on request within 30 days of delivery.
When you want us to do the work, every offer and its published price is on our offers page. More free checks: the ChatGPT Business Hub readiness check, the page token count, the raw HTML readability checker, the Search Console opportunity scanner and the crawler identity inspector, or see all free tools.