Ship analysis faster. Check what you can.
Formula Genius helps data analysts generate spreadsheet formulas, SQL queries, and regex patterns from plain-English descriptions, then review the output and check supported formulas. Review generated results before using them in your work.
Generate drafts for SQL analysis, Excel calculations, and regex extraction. Review the result; supported formula checks are a separate step.
"Rank customers by lifetime value within each segment, show top 10 per segment"
WITH ranked AS (
SELECT *, ROW_NUMBER() OVER (
PARTITION BY segment
ORDER BY lifetime_value DESC
) AS rn
FROM customers
)
SELECT * FROM ranked WHERE rn <= 10;
Spreadsheet challenges that data analysts face every day.
SQL syntax varies by database
PostgreSQL window frames differ from MySQL. SQL Server has unique functions. Writing portable queries wastes time on syntax research.
Edge cases break analyses
NULL handling, division by zero, type mismatches, and off-by-one errors in date logic — the bugs you only find after sharing results.
Regex is write-once, read-never
You need to extract emails, parse log files, or validate formats. You write a regex, it works, and no one (including you) can read it 3 months later.
Real formulas for data analysts
Describe what you need. Review a formula draft and the checks available.
"Cohort retention analysis — monthly user retention by signup month"
WITH cohorts AS (
SELECT user_id, DATE_TRUNC('month', signup_date) AS cohort_month
FROM users
),
activity AS (
SELECT user_id, DATE_TRUNC('month', event_date) AS active_month
FROM events
GROUP BY 1, 2
)
SELECT c.cohort_month,
a.active_month,
COUNT(DISTINCT a.user_id) AS active_users,
ROUND(COUNT(DISTINCT a.user_id)::numeric / MAX(cohort_size) * 100, 1) AS retention_pct
FROM cohorts c
JOIN activity a ON c.user_id = a.user_id
JOIN (SELECT cohort_month, COUNT(*) AS cohort_size FROM cohorts GROUP BY 1) sizes
ON c.cohort_month = sizes.cohort_month
GROUP BY 1, 2
ORDER BY 1, 2;
"Extract all email addresses from a column of unstructured text"
[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}
"Percentile distribution of response times"
SELECT
PERCENTILE_CONT(0.50) WITHIN GROUP (ORDER BY response_ms) AS p50,
PERCENTILE_CONT(0.90) WITHIN GROUP (ORDER BY response_ms) AS p90,
PERCENTILE_CONT(0.99) WITHIN GROUP (ORDER BY response_ms) AS p99
FROM api_logs
WHERE date >= CURRENT_DATE - INTERVAL '7 days';
"Dynamic array to show all unique values and their counts"
=LET(
vals, UNIQUE(A2:A1000),
counts, COUNTIF(A2:A1000, vals),
SORT(HSTACK(vals, counts), 2, -1)
)
Features that matter for data analysts.
Database-aware SQL
Specify PostgreSQL, MySQL, SQL Server, or BigQuery. Get syntax optimized for your engine — including database-specific functions and performance hints.
Window function builder
ROW_NUMBER, RANK, LAG, LEAD, running totals, moving averages — describe the analysis and get the right OVER() clause every time.
Regex with explanations
Every generated regex includes a character-by-character breakdown. No more write-once-read-never patterns.
Check before you rely on it
Review sample cases, assumptions, and stated coverage for supported formula checks. Test SQL queries and regex patterns against your own data before use.
Frequently asked questions
Which SQL dialects are supported?
PostgreSQL, MySQL, SQL Server, SQLite, and BigQuery. Specify your database and get optimized syntax with engine-specific functions.
Can it generate complex CTEs and window functions?
Yes. Multi-CTE queries, recursive CTEs, window functions with custom frames, and correlated subqueries are all supported. Describe the analysis in English.
Does it handle regex for log parsing?
Yes. Describe what you want to extract — timestamps, IPs, error codes, URLs — and get a regex draft with explanations for every component. Test it against representative input before use.
Put this workflow to work.
Describe what you need in plain English. Review the generated result, its explanation, and any available checks before using it.

