Skip to content

Function reference

This chapter lists every function in Ganit, 227 in all, grouped as on the Formulas tab. For each one it shows how the function is written, what it does, and an example with the result Ganit gives.

In the Function column, arguments in [square brackets] can be left out, and … means you can give more of the same. For how to type a formula and use these functions, see Formulas.

The same examples are in Ganit: click Help ▸ Functions, find a function, and the guide works the examples out. Its Use in Cell button starts the function in the active cell.

The example table

Some examples use this small table of a tea stall's sales, in A1:C5 of a sheet:

A B C
1 Item Qty Price
2 Tea 12 15
3 Coffee 5 25
4 Samosa 40 12
5 Tea 8 15

Results that spill into several cells are shown one row to a line, with the columns separated by commas. Numbers are shown as Ganit shows them in a new cell; format the cell to show them as ₹ or per cent. Notes in brackets after a result explain the example.

India

Ganit's own functions for Indian bills, accounts and offices. Other spreadsheet apps don't know them: a file opened elsewhere keeps the results Ganit saved, but shows an error if that app works the cell out again. For more on amounts in words, lakhs and crores, GSTIN checks and the financial year, see Indian formats, words and languages.

Function What it does Example Result
FY(date, [start_month]) The financial year a date is in, such as "2026-27". The year starts in April unless [start_month] says otherwise. =FY(DATE(2026, 11, 17)) 2026-27 (April–March year)
=FY(DATE(2026, 2, 10)) 2025-26
FYEND(date, [start_month]) The last day of a date's financial year (31 March). =TEXT(FYEND(DATE(2026, 11, 17)), "dd-mm-yyyy") 31-03-2027
FYQUARTER(date, [start_month]) The quarter of the financial year, 1 to 4. April to June is 1. =FYQUARTER(DATE(2026, 11, 17)) 3
=FYQUARTER(DATE(2026, 4, 1)) 1
FYSTART(date, [start_month]) The first day of a date's financial year (1 April). =TEXT(FYSTART(DATE(2026, 11, 17)), "dd-mm-yyyy") 01-04-2026
GSTBASE(amount, rate) The taxable value inside a price that includes GST. =GSTBASE(1180, 18%) 1000 (the price before 18% GST)
GSTINSTATE(gstin) The state or union territory a GSTIN is registered in, from its first two digits. =GSTINSTATE("27AAPFU0939F1ZV") Maharashtra
=GSTINSTATE("29AAACB1234C1Z5") Karnataka
GSTTAX(amount, rate, [inclusive]) The GST on an amount at a rate (18% or 18). With [inclusive] TRUE, the GST inside a price that already includes it. Half of it is CGST and half SGST. =GSTTAX(1000, 18%) 180 (GST on ₹1,000 at 18%)
=GSTTAX(1180, 18%, TRUE) 180 (the GST inside ₹1,180)
INRSHORT(amount, [decimals]) An amount written short in lakhs or crores, as text. Below a lakh, the full amount with commas. =INRSHORT(1250000) ₹12.5 L
=INRSHORT(45000000, 2) ₹4.5 Cr
ISGSTIN(text) TRUE when the text is a valid GSTIN: the state code, the PAN inside it and its check character are all checked. =ISGSTIN("27AAPFU0939F1ZV") TRUE
=ISGSTIN("27AAPFU0939F1Z0") FALSE
ISPAN(text) TRUE when the text is a valid PAN: five letters, four digits, a letter. =ISPAN("AAPFU0939F") TRUE
=ISPAN("AAPF0939F") FALSE
KRUTITOUNICODE(text, [font]) Text typed in an old Hindi or Marathi font, as Unicode: "Hkkjr" becomes "भारत". Reads Kruti Dev, DevLys and Walkman, unless [font] names another ("Akruti Dev Priya", "Chanakya"). =KRUTITOUNICODE("Hkkjr") भारत (Kruti Dev text to Unicode)
RUPEEWORDS(amount, [language]) An amount in words, for bills and cheques. [language] "hi" or "हिंदी" writes Hindi, "mr" or "मराठी" writes Marathi. =RUPEEWORDS(120000) Rupees One Lakh Twenty Thousand Only (English)
=RUPEEWORDS(120000, "hi") एक लाख बीस हज़ार रुपये मात्र (Hindi)
UNICODETOKRUTI(text) Unicode Hindi or Marathi as Kruti Dev 010 letters, for printers and forms that still use that font. =UNICODETOKRUTI("भारत") Hkkjr (back to Kruti Dev letters)

Financial

Loans, EMIs, savings, depreciation and returns. Rates are per period: for a monthly EMI at 9% a year, use 9%/12 and the number of months. Money you pay out comes back as a minus number, so PMT gives the EMI as a minus amount.

Function What it does Example Result
CUMIPMT(rate, nper, pv, start_period, end_period, type) The interest paid on a loan between two payments, such as the first year's interest. =CUMIPMT(9%/12, 60, 500000, 1, 12, 0) -41635.11989 (the first year's interest on a loan)
CUMPRINC(rate, nper, pv, start_period, end_period, type) The principal repaid on a loan between two payments. =CUMPRINC(9%/12, 60, 500000, 1, 12, 0) -82915.01147 (the first year's principal)
DB(cost, salvage, life, period, [month]) Depreciation for a period by the fixed-declining balance method. =DB(100000, 10000, 5, 1) 36900
DDB(cost, salvage, life, period, [factor]) Depreciation for a period by the double-declining balance (written-down value) method. =DDB(100000, 10000, 5, 1) 40000
EFFECT(nominal_rate, npery) The effective yearly rate of a nominal rate compounded several times a year. =EFFECT(8%, 4) 0.08243216 (8% a year, paid quarterly)
FV(rate, nper, pmt, [pv], [type]) The future value of an investment with regular payments. =FV(7%/12, 120, -5000) 865424.0372 (₹5,000 a month for 10 years at 7%)
FVSCHEDULE(principal, schedule) The future value of an amount after a series of interest rates. =FVSCHEDULE(100000, {0.07, 0.08, 0.075}) 124227
IPMT(rate, per, nper, pv, [fv], [type]) The interest part of one payment of a loan. =IPMT(9%/12, 1, 60, 500000) -3750 (the first month's interest)
IRR(values, [guess]) The internal rate of return of cash flows. =IRR({-100000, 30000, 35000, 40000, 45000}) 0.1709368634
ISPMT(rate, per, nper, pv) The interest of one period of a loan repaid in equal principal parts. =ISPMT(9%/12, 1, 60, 500000) -3687.5
MIRR(values, finance_rate, reinvest_rate) The modified internal rate of return, with a borrowing rate and a reinvestment rate. =MIRR({-100000, 30000, 35000, 40000, 45000}, 10%, 12%) 0.1515604194
NOMINAL(effect_rate, npery) The nominal yearly rate of an effective rate. =NOMINAL(8.24%, 4) 0.07996969458
NPER(rate, pmt, pv, [fv], [type]) The number of payments for a loan or investment. =NPER(9%/12, -10000, 500000) 62.90185972 (months to repay)
NPV(rate, value1, [value2], …) The net present value of cash flows. =NPV(10%, 30000, 35000, 40000, 45000) - 100000 16986.54463
PDURATION(rate, pv, fv) The number of periods for an investment to grow to an amount. =PDURATION(7%, 100000, 200000) 10.24476835 (years to double at 7%)
PMT(rate, nper, pv, [fv], [type]) The payment (EMI) for a loan with a fixed rate. =PMT(9%/12, 60, 500000) -10379.17761 (the EMI on ₹5 lakh, 5 years, 9% (minus: money going out))
=ROUND(-PMT(9%/12, 60, 500000), 0) 10379 (the EMI, rounded)
PPMT(rate, per, nper, pv, [fv], [type]) The principal part of one payment of a loan. =PPMT(9%/12, 1, 60, 500000) -6629.177613 (the first month's principal)
PV(rate, nper, pmt, [fv], [type]) The present value of an investment. =PV(7%/12, 120, -5000) 430631.7707 (what ₹5,000 a month for 10 years is worth now)
RATE(nper, pmt, pv, [fv], [type], [guess]) The interest rate per period of a loan or investment. Multiply by 12 for the yearly rate of a monthly loan. =RATE(60, -10379.18, 500000) * 12 0.09000009836 (the yearly rate)
RRI(nper, pv, fv) The rate of growth per period from a starting to an ending amount (like CAGR). =RRI(5, 100000, 150000) 0.0844717712 (yearly growth from 1 to 1.5 lakh)
SLN(cost, salvage, life) Straight-line depreciation for one period. =SLN(100000, 10000, 5) 18000
SYD(cost, salvage, life, per) Sum-of-years' digits depreciation for a period. =SYD(100000, 10000, 5, 1) 30000
VDB(cost, salvage, life, start_period, end_period, [factor], [no_switch]) Declining-balance depreciation between two points, switching to straight line when that is more. =VDB(100000, 10000, 5, 0, 1) 40000
XIRR(values, dates, [guess]) The yearly rate of return of cash flows on any dates (as for SIPs and mutual funds). =XIRR({-100000, 50000, 60000}, {46023, 46388, 46753}) 0.0639410298 (the dates 46023, 46388 and 46753 are 1 January 2026, 2027 and 2028)
XNPV(rate, values, dates) The net present value of cash flows on any dates. =XNPV(10%, {-100000, 50000, 60000}, {46023, 46388, 46753}) -4958.677686 (the same dates as for XIRR)

Date & Time

Ganit stores a date as a number of days and a time as a part of a day, so you can add days to a date or subtract one date from another. Some examples use TEXT to show a date in a format; without it, the cell shows the date in the cell's own date format.

Function What it does Example Result
DATE(year, month, day) The date from a year, month and day. =TEXT(DATE(2026, 11, 17), "dd-mm-yyyy") 17-11-2026
=DATE(2026, 11, 17) 17/11/2026 (shown as a date)
DATEDIF(start_date, end_date, unit) Years ("Y"), months ("M") or days ("D") between two dates. =DATEDIF(DATE(1990, 5, 15), DATE(2026, 11, 17), "Y") 36 (age in whole years)
=DATEDIF(DATE(2026, 1, 1), DATE(2026, 11, 17), "M") 10 (whole months)
DATEVALUE(date_text) A date typed as text, as a date. =TEXT(DATEVALUE("2026-11-17"), "dd mmm yyyy") 17 Nov 2026
DAY(serial_number) The day of the month, 1 to 31. =DAY(DATE(2026, 11, 17)) 17
DAYS(end_date, start_date) The number of days between two dates. =DAYS(DATE(2026, 12, 25), DATE(2026, 11, 17)) 38
EDATE(start_date, months) The date a number of months before or after a date. =TEXT(EDATE(DATE(2026, 1, 31), 1), "dd-mm-yyyy") 28-02-2026
EOMONTH(start_date, months) The last day of the month, a number of months away. =TEXT(EOMONTH(DATE(2026, 2, 10), 0), "dd-mm-yyyy") 28-02-2026
=TEXT(EOMONTH(DATE(2026, 2, 10), 1), "dd-mm-yyyy") 31-03-2026
HOUR(serial_number) The hour, 0 to 23. =HOUR(TIME(14, 30, 0)) 14
MINUTE(serial_number) The minute, 0 to 59. =MINUTE(TIME(14, 30, 0)) 30
MONTH(serial_number) The month, 1 (January) to 12 (December). =MONTH(DATE(2026, 11, 17)) 11
NETWORKDAYS(start_date, end_date, [holidays]) Working days (Monday to Friday) between two dates. =NETWORKDAYS(DATE(2026, 11, 2), DATE(2026, 11, 30)) 21 (Monday to Friday)
NETWORKDAYS.INTL(start_date, end_date, [weekend], [holidays]) Working days between two dates, with the weekend you choose: 11 or "0000001" for Sunday only (a six-day week). =NETWORKDAYS.INTL(DATE(2026, 11, 2), DATE(2026, 11, 30), 11) 25 (only Sunday off)
NOW() The date and time now. =TEXT(NOW(), "dd-mm-yyyy hh:mm") the date and time now
SECOND(serial_number) The second, 0 to 59. =SECOND(TIME(14, 30, 45)) 45
TIME(hour, minute, second) The time from hours, minutes and seconds. =TEXT(TIME(14, 30, 0), "hh:mm AM/PM") 02:30 PM
TODAY() Today's date. =TEXT(TODAY(), "dd-mm-yyyy") today's date
WEEKDAY(serial_number, [return_type]) The day of the week, 1 (Sunday) to 7 (Saturday). =WEEKDAY(DATE(2026, 11, 17)) 3 (1 = Sunday)
=WEEKDAY(DATE(2026, 11, 17), 2) 2 (1 = Monday)
WEEKNUM(serial_number, [return_type]) The week number in the year. =WEEKNUM(DATE(2026, 11, 17)) 47
WORKDAY(start_date, days, [holidays]) The date a number of working days away. =TEXT(WORKDAY(DATE(2026, 11, 17), 10), "dd-mm-yyyy") 01-12-2026 (10 working days on)
WORKDAY.INTL(start_date, days, [weekend], [holidays]) The date a number of working days away, with the weekend you choose: 11 or "0000001" for Sunday only. =TEXT(WORKDAY.INTL(DATE(2026, 11, 17), 10, 11), "dd-mm-yyyy") 28-11-2026 (only Sunday off)
YEAR(serial_number) The year of a date. =YEAR(DATE(2026, 11, 17)) 2026

Math & Trig

Sums, rounding, multiples and the like. The angle functions work in radians; use RADIANS and DEGREES to change between radians and degrees.

Function What it does Example Result
ABS(number) The number without its sign. =ABS(-42) 42
=ABS(3.5) 3.5
ACOS(number) The arccosine of a number, in radians. =ACOS(1) 0
=DEGREES(ACOS(0.5)) 60
ASIN(number) The arcsine of a number, in radians. =ASIN(1) 1.570796327
=DEGREES(ASIN(0.5)) 30
ATAN(number) The arctangent of a number, in radians. =ATAN(1) 0.7853981634
=DEGREES(ATAN(1)) 45
ATAN2(x_num, y_num) The arctangent of the point (x, y), in radians. =ATAN2(1, 1) 0.7853981634
=DEGREES(ATAN2(-1, 1)) 135
CEILING(number, significance) Rounds a number up to the nearest multiple of significance. =CEILING(47, 5) 50
=CEILING(2.31, 0.05) 2.35
CEILING.MATH(number, [significance], [mode]) Rounds a number up to the nearest integer or multiple. =CEILING.MATH(47, 10) 50
=CEILING.MATH(-4.3) -4
COS(number) The cosine of an angle in radians. =COS(0) 1
=COS(RADIANS(60)) 0.5
DEGREES(angle) Radians to degrees. =DEGREES(PI()) 180
=DEGREES(PI() / 2) 90
EVEN(number) Rounds up to the nearest even integer. =EVEN(3) 4
=EVEN(-1.5) -2
EXP(number) e raised to a power. =EXP(1) 2.718281828
=EXP(2) 7.389056099
FACT(number) The factorial of a number. =FACT(5) 120
=FACT(10) 3628800
FLOOR(number, significance) Rounds a number down to the nearest multiple of significance. =FLOOR(47, 5) 45
=FLOOR(2.37, 0.05) 2.35
FLOOR.MATH(number, [significance], [mode]) Rounds a number down to the nearest integer or multiple. =FLOOR.MATH(47, 10) 40
=FLOOR.MATH(-4.3) -5
GCD(number1, [number2], …) The greatest common divisor. =GCD(24, 36) 12
=GCD(15, 25, 40) 5
INT(number) Rounds down to the nearest integer. =INT(8.9) 8
=INT(-8.9) -9
LCM(number1, [number2], …) The least common multiple. =LCM(4, 6) 12
=LCM(3, 5, 7) 105
LN(number) The natural logarithm. =LN(EXP(3)) 3
=LN(10) 2.302585093
LOG(number, [base]) The logarithm to a base (10 when left out). =LOG(1000) 3
=LOG(8, 2) 3
LOG10(number) The base-10 logarithm. =LOG10(1000) 3
=LOG10(2) 0.3010299957
MOD(number, divisor) The remainder after dividing. =MOD(17, 5) 2
=MOD(-3, 5) 2
MROUND(number, multiple) Rounds to the nearest multiple. =MROUND(47, 5) 45
=MROUND(1.234, 0.05) 1.25
ODD(number) Rounds up to the nearest odd integer. =ODD(4) 5
=ODD(-2.5) -3
PI() The number π, 3.14159265358979. =PI() 3.141592654
=PI() * 5 ^ 2 78.53981634
POWER(number, power) A number raised to a power. =POWER(2, 10) 1024
=POWER(27, 1/3) 3
PRODUCT(number1, [number2], …) Multiplies the numbers. =PRODUCT(2, 3, 4) 24
=PRODUCT({1.5, 2, 4}) 12
QUOTIENT(numerator, denominator) The whole-number part of a division. =QUOTIENT(17, 5) 3
=QUOTIENT(-17, 5) -3
RADIANS(angle) Degrees to radians. =RADIANS(180) 3.141592654
=RADIANS(45) 0.7853981634
RAND() A random number from 0 to 1. =RAND() a number from 0 to 1, new each time the sheet works out
RANDARRAY([rows], [columns], [min], [max], [whole_number]) An array of random numbers. =RANDARRAY(2, 3, 1, 100, TRUE) 2 rows of 3 whole numbers from 1 to 100
RANDBETWEEN(bottom, top) A random whole number between two numbers. =RANDBETWEEN(1, 6) a whole number from 1 to 6
ROUND(number, num_digits) Rounds to a number of digits. =ROUND(1234.567, 2) 1234.57
=ROUND(1234.567, -2) 1200
ROUNDDOWN(number, num_digits) Rounds down, towards zero. =ROUNDDOWN(3.789, 1) 3.7
=ROUNDDOWN(-3.789, 0) -3
ROUNDUP(number, num_digits) Rounds up, away from zero. =ROUNDUP(3.21, 1) 3.3
=ROUNDUP(1234, -2) 1300
SEQUENCE(rows, [columns], [start], [step]) A list of numbers in sequence. =SEQUENCE(12) is 1 to 12 down a column. =SEQUENCE(4) 1
2
3
4 (spills down)
=SEQUENCE(2, 3, 10, 5) 10, 15, 20
25, 30, 35 (2 rows, 3 columns)
SIGN(number) 1, 0 or -1 for a positive, zero or negative number. =SIGN(-25) -1
=SIGN(0) 0
SIN(number) The sine of an angle in radians. =SIN(RADIANS(30)) 0.5
=SIN(PI() / 2) 1
SQRT(number) The square root. =SQRT(144) 12
=SQRT(2) 1.414213562
SUBTOTAL(function_num, ref1, …) A subtotal of a range: 9 SUM, 1 AVERAGE, 2 COUNT, 4 MAX, 5 MIN and so on. =SUBTOTAL(9, B2:B5) 65 (9 = SUM of the table's Qty)
=SUBTOTAL(1, C2:C5) 16.75 (1 = AVERAGE of Price)
SUM(number1, [number2], …) Adds the numbers. =SUM(10, 20, 30) 60
=SUM({5, 15, 25}, 5) 50
SUMIF(range, criteria, [sum_range]) Adds the cells that meet a condition. =SUMIF(A2:A5, "Tea", B2:B5) 20 (Qty of Tea)
=SUMIF(B2:B5, ">10") 52 (Qty above 10)
SUMIFS(sum_range, criteria_range1, criteria1, …) Adds the cells that meet every condition. =SUMIFS(B2:B5, A2:A5, "Tea", C2:C5, 15) 20 (Tea at ₹15)
SUMPRODUCT(array1, [array2], …) Multiplies the ranges item by item and adds the results. =SUMPRODUCT(B2:B5, C2:C5) 905 (the table's total sales)
=SUMPRODUCT({1, 2, 3}, {4, 5, 6}) 32
SUMSQ(number1, [number2], …) The sum of the squares. =SUMSQ(3, 4) 25
=SUMSQ({1, 2, 3}) 14
TAN(number) The tangent of an angle in radians. =TAN(RADIANS(45)) 1
=TAN(0) 0
TRUNC(number, [num_digits]) Cuts a number to a number of digits. =TRUNC(8.97) 8
=TRUNC(-8.97) -8

Statistical

Averages, counts, the largest and smallest values, ranks, percentiles and spread. The criteria in COUNTIF, SUMIF and similar functions can be a value ("Tea"), a comparison in quotes (">10"), or text with * and ? for any characters.

Function What it does Example Result
AVERAGE(number1, [number2], …) The average (arithmetic mean) of the numbers. =AVERAGE(10, 20, 30) 20
=AVERAGE(C2:C5) 16.75 (the table's average Price)
AVERAGEA(value1, [value2], …) The average, counting text as 0 and TRUE as 1. =AVERAGEA({10, 20}, TRUE) 10.33333333
AVERAGEIF(range, criteria, [average_range]) The average of the cells that meet a condition. =AVERAGEIF(A2:A5, "Tea", B2:B5) 10 (average Qty of Tea)
AVERAGEIFS(average_range, criteria_range1, criteria1, …) The average of the cells that meet every condition. =AVERAGEIFS(B2:B5, A2:A5, "Tea", B2:B5, ">5") 10
COUNT(value1, [value2], …) How many cells contain numbers. =COUNT(1, "a", 3, TRUE) 3
=COUNT(A1:C5) 8 (numbers in the table)
COUNTA(value1, [value2], …) How many cells are not empty. =COUNTA(1, "a", "", 3) 4
=COUNTA(A2:A5) 4 (items in the table)
COUNTBLANK(range) How many cells in a range are empty. =COUNTBLANK(A1:C6) 3 (row 6 is empty)
COUNTIF(range, criteria) How many cells meet a condition, e.g. ">100" or "Pen*". =COUNTIF(A2:A5, "Tea") 2
=COUNTIF(B2:B5, ">=10") 2
COUNTIFS(criteria_range1, criteria1, …) How many rows meet every condition. =COUNTIFS(A2:A5, "Tea", B2:B5, ">10") 1
LARGE(array, k) The k-th largest number. =LARGE({4, 9, 2, 7}, 1) 9
=LARGE({4, 9, 2, 7}, 2) 7
MAX(number1, [number2], …) The largest number. =MAX(4, 9, 2) 9
=MAX(B2:B5) 40 (the largest Qty)
MAXIFS(max_range, criteria_range1, criteria1, …) The largest number among the cells that meet every condition. =MAXIFS(B2:B5, A2:A5, "Tea") 12 (the largest Tea Qty)
MEDIAN(number1, [number2], …) The middle number. =MEDIAN(3, 1, 4, 1, 5) 3
=MEDIAN({2, 4, 6, 8}) 5
MIN(number1, [number2], …) The smallest number. =MIN(4, 9, 2) 2
=MIN(C2:C5) 12 (the lowest Price)
MINIFS(min_range, criteria_range1, criteria1, …) The smallest number among the cells that meet every condition. =MINIFS(C2:C5, B2:B5, ">5") 12
MODE(number1, [number2], …) The most common number. =MODE(1, 2, 2, 3, 3, 3) 3
MODE.SNGL(number1, [number2], …) The most common number. =MODE.SNGL({5, 7, 7, 9}) 7
PERCENTILE(array, k) The k-th percentile (k from 0 to 1). =PERCENTILE({1, 2, 3, 4, 5}, 0.9) 4.6
PERCENTILE.INC(array, k) The k-th percentile (k from 0 to 1). =PERCENTILE.INC({10, 20, 30, 40}, 0.25) 17.5
QUARTILE(array, quart) A quartile (0 to 4) of the numbers. =QUARTILE({1, 2, 3, 4, 5, 6, 7, 8}, 1) 2.75
QUARTILE.INC(array, quart) A quartile (0 to 4) of the numbers. =QUARTILE.INC({1, 2, 3, 4, 5, 6, 7, 8}, 3) 6.25
RANK(number, ref, [order]) The rank of a number in a list (0 for largest first). =RANK(B3, B2:B5) 4 (Coffee's Qty, ranked)
RANK.EQ(number, ref, [order]) The rank of a number in a list. =RANK.EQ(7, {4, 9, 7, 2}) 2
=RANK.EQ(7, {4, 9, 7, 2}, 1) 3
SMALL(array, k) The k-th smallest number. =SMALL({4, 9, 2, 7}, 1) 2
=SMALL({4, 9, 2, 7}, 3) 7
STDEV(number1, [number2], …) Standard deviation of a sample. =STDEV(2, 4, 4, 4, 5, 5, 7, 9) 2.138089935
STDEV.P(number1, [number2], …) Standard deviation of a whole population. =STDEV.P(2, 4, 4, 4, 5, 5, 7, 9) 2
STDEV.S(number1, [number2], …) Standard deviation of a sample. =STDEV.S({2, 4, 4, 4, 5, 5, 7, 9}) 2.138089935
STDEVP(number1, [number2], …) Standard deviation of a whole population. =STDEVP({2, 4, 4, 4, 5, 5, 7, 9}) 2
VAR(number1, [number2], …) Variance of a sample. =VAR(1, 2, 3, 4, 5) 2.5
VAR.P(number1, [number2], …) Variance of a whole population. =VAR.P(1, 2, 3, 4, 5) 2
VAR.S(number1, [number2], …) Variance of a sample. =VAR.S({1, 2, 3, 4, 5}) 2.5
VARP(number1, [number2], …) Variance of a whole population. =VARP({1, 2, 3, 4, 5}) 2

Lookup & Reference

Finding a value in a table, and working with ranges and arrays. Functions such as FILTER, SORT and UNIQUE spill their results into the cells around them; see Formulas.

Function What it does Example Result
CHOOSE(index_num, value1, [value2], …) Picks a value from the list by its position. =CHOOSE(2, "Red", "Green", "Blue") Green
CHOOSECOLS(array, col_num1, [col_num2], …) The columns of an array you pick by number; negative numbers count from the right. =CHOOSECOLS(A1:C3, 1, 3) Item, Price
Tea, 15
Coffee, 25 (Item and Price)
CHOOSEROWS(array, row_num1, [row_num2], …) The rows of an array you pick by number; negative numbers count from the bottom. =CHOOSEROWS(A1:C5, 1, 4) Item, Qty, Price
Samosa, 40, 12 (the heading and Samosa)
COLUMN([reference]) The column number of a reference. =COLUMN(C7) 3
COLUMNS(array) The number of columns in a range. =COLUMNS(A1:C5) 3
=COLUMNS({1, 2, 3, 4}) 4
DROP(array, rows, [columns]) An array without its first rows or columns (negative: without its last). =DROP(A1:C5, 1) Tea, 12, 15
Coffee, 5, 25
Samosa, 40, 12
Tea, 8, 15 (without the heading row)
EXPAND(array, rows, [columns], [pad_with]) An array made bigger to a number of rows and columns, filled with pad_with. =EXPAND({1, 2}, 2, 3, 0) 1, 2, 0
0, 0, 0 (padded with 0)
FILTER(array, include, [if_empty]) The rows (or columns) of an array where include is TRUE. Spills into the cells below. =FILTER(A2:B5, B2:B5 > 10) Tea, 12
Samosa, 40 (rows with Qty above 10)
HLOOKUP(lookup_value, table_array, row_index_num, [range_lookup]) Looks along the top row of a table and returns a value from a row below. =HLOOKUP("Qty", A1:C5, 3, FALSE) 5 (row 3 of the Qty column)
HSTACK(array1, [array2], …) Arrays put side by side in one array. =HSTACK({1; 2}, {"a"; "b"}) 1, a
2, b
HYPERLINK(link_location, [friendly_name]) A link: the cell shows friendly_name and opens link_location when you click it. =HYPERLINK("https://kraftoz.com", "Kraftoz") Kraftoz (a link to click)
INDEX(array, row_num, [column_num]) The value at a row and column of a range. =INDEX(A1:C5, 3, 1) Coffee (row 3, column 1 of the table)
=INDEX({10, 20, 30}, 2) 20
INDIRECT(ref_text) The reference written in a text, e.g. "B5". =INDIRECT("B" & 4) 40 (the cell B4)
LOOKUP(lookup_value, lookup_vector, [result_vector]) Looks up a value in a sorted list. =LOOKUP(25, {10, 20, 30}, {"Low", "Mid", "High"}) Mid (the list must be in ascending order)
=LOOKUP(1500, {0, 1000, 5000}, {"Small", "Medium", "Large"}) Medium (the band a number falls in)
MATCH(lookup_value, lookup_array, [match_type]) The position of a value in a range (0 for an exact match). =MATCH("Coffee", A2:A5, 0) 2 (its place in the list)
=MATCH(25, {10, 20, 30}, 1) 2
OFFSET(reference, rows, cols, [height], [width]) A range a number of rows and columns away from a reference. =SUM(OFFSET(B1, 1, 0, 4, 1)) 65 (the four Qty cells under B1)
ROW([reference]) The row number of a reference. =ROW(C7) 7
ROWS(array) The number of rows in a range. =ROWS(A1:C5) 5
=ROWS({1; 2; 3}) 3
SORT(array, [sort_index], [sort_order], [by_col]) An array sorted by one of its columns; sort_order -1 for largest first. =SORT({3; 1; 2}) 1
2
3 (a column, smallest first)
=SORT(A2:B5, 2, -1) Samosa, 40
Tea, 12
Tea, 8
Coffee, 5 (the table by Qty, largest first)
SORTBY(array, by_array1, [sort_order1], …) An array sorted by other ranges or arrays. =SORTBY(A2:A5, B2:B5, -1) Samosa
Tea
Tea
Coffee (items by Qty)
TAKE(array, rows, [columns]) The first rows or columns of an array (negative: the last). =TAKE(A1:C5, 2) Item, Qty, Price
Tea, 12, 15 (the first two rows)
TOCOL(array, [ignore], [scan_by_column]) An array as one column; ignore 1 skips blanks, 2 errors, 3 both. =TOCOL({1, 2; 3, 4}) 1
2
3
4
TOROW(array, [ignore], [scan_by_column]) An array as one row; ignore 1 skips blanks, 2 errors, 3 both. =TOROW({1, 2; 3, 4}) 1, 2, 3, 4
TRANSPOSE(array) Rows turned into columns and columns into rows. =TRANSPOSE({1, 2, 3}) 1
2
3
UNIQUE(array, [by_col], [exactly_once]) Each different value (or row) once, such as every customer in a long list. =UNIQUE(A2:A5) Tea
Coffee
Samosa (each item once)
VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup]) Looks down the first column of a table and returns a value from a column to the right. FALSE for an exact match. =VLOOKUP("Coffee", A2:C5, 3, FALSE) 25 (Coffee's Price)
=VLOOKUP("Milk", A2:C5, 3, FALSE) #N/A (not in the table: #N/A)
VSTACK(array1, [array2], …) Arrays put one under another in one array. =VSTACK({1, 2}, {3, 4}) 1, 2
3, 4
WRAPCOLS(vector, wrap_count, [pad_with]) A row or column of values wrapped into columns of a given length. =WRAPCOLS({1, 2, 3, 4, 5, 6}, 3) 1, 4
2, 5
3, 6
WRAPROWS(vector, wrap_count, [pad_with]) A row or column of values wrapped into rows of a given length. =WRAPROWS({1, 2, 3, 4, 5, 6}, 3) 1, 2, 3
4, 5, 6
XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found], [match_mode], [search_mode]) Looks up a value in one range and returns the matching item from another. =XLOOKUP("Samosa", A2:A5, C2:C5) 12 (Samosa's Price)
=XLOOKUP("Milk", A2:A5, C2:C5, "No such item") No such item (with a not-found message)
XMATCH(lookup_value, lookup_array, [match_mode], [search_mode]) The position of a value in a list. Like MATCH, but exact by default, and it can search from the end. =XMATCH("Samosa", A2:A5) 3
=XMATCH(25, {10, 20, 30}, 1) 3

Text

Joining, splitting, cutting and changing text, and turning numbers into text and back.

Function What it does Example Result
CHAR(number) The character with this code. =CHAR(65) A
=CHAR(97) a
CLEAN(text) Removes characters that can't be printed. =LEN(CLEAN("Hi" & CHAR(10) & "there")) 7
CODE(text) The code of the first character. =CODE("A") 65
=CODE("a") 97
CONCAT(text1, [text2], …) Joins texts and ranges together. =CONCAT("Kraftoz", " ", "Ganit") Kraftoz Ganit
=CONCAT({"a", "b", "c"}) abc
CONCATENATE(text1, [text2], …) Joins texts together. =CONCATENATE("Invoice ", 101) Invoice 101
EXACT(text1, text2) TRUE when two texts are exactly the same, with case. =EXACT("Tea", "Tea") TRUE
=EXACT("Tea", "tea") FALSE
FIND(find_text, within_text, [start_num]) Where a text starts inside another (with case). =FIND("a", "Banana") 2
=FIND("a", "Banana", 3) 4
LEFT(text, [num_chars]) The first characters of a text. =LEFT("Kraftoz", 5) Kraft
=LEFT("₹500") ₹
LEN(text) The number of characters in a text. =LEN("Kraftoz") 7
=LEN("भारत") 4
LOWER(text) The text in small letters. =LOWER("GANIT") ganit
MID(text, start_num, num_chars) Characters from the middle of a text. =MID("27AAPFU0939F1ZV", 3, 10) AAPFU0939F
=MID("Kraftoz", 2, 3) raf
PROPER(text) Capital Letter At The Start Of Each Word. =PROPER("ravi kumar sharma") Ravi Kumar Sharma
REPLACE(old_text, start_num, num_chars, new_text) Replaces part of a text by position. =REPLACE("2025-26", 1, 4, "2026") 2026-26
REPT(text, number_times) Repeats a text. =REPT("★", 4) ★★★★
=REPT("-", 10) ----------
RIGHT(text, [num_chars]) The last characters of a text. =RIGHT("Kraftoz", 3) toz
=RIGHT("INV-0042", 4) 0042
SEARCH(find_text, within_text, [start_num]) Where a text starts inside another (without case, with * and ?). =SEARCH("tea", "Masala Tea") 8
=SEARCH("?a", "Masala") 1
SUBSTITUTE(text, old_text, new_text, [instance_num]) Replaces one text with another inside a text. =SUBSTITUTE("2026/11/17", "/", "-") 2026-11-17
=SUBSTITUTE("a-b-c", "-", "+", 2) a-b+c
T(value) The value when it is text, otherwise empty text. =T("text") text
=T(42) (empty text) (a number gives empty text)
TEXT(value, format_text) A number as text, in a number format. =TEXT(1234567.891, "#,##,##0.00") 12,34,567.89
=TEXT(0.185, "0.0%") 18.5%
TEXTAFTER(text, delimiter, [instance_num], [match_mode], [match_end], [if_not_found]) The text after a delimiter, such as the domain of an e-mail address. =TEXTAFTER("ravi@kraftoz.com", "@") kraftoz.com
=TEXTAFTER("a-b-c", "-", 2) c
TEXTBEFORE(text, delimiter, [instance_num], [match_mode], [match_end], [if_not_found]) The text before a delimiter; a negative instance counts from the end. =TEXTBEFORE("ravi@kraftoz.com", "@") ravi
=TEXTBEFORE("a-b-c", "-", -1) a-b
TEXTJOIN(delimiter, ignore_empty, text1, …) Joins texts with a separator between them. =TEXTJOIN(", ", TRUE, "Tea", "", "Coffee", "Samosa") Tea, Coffee, Samosa
=TEXTJOIN(" / ", TRUE, A2:A4) Tea / Coffee / Samosa (the table's items)
TEXTSPLIT(text, col_delimiter, [row_delimiter], [ignore_empty], [match_mode], [pad_with]) Splits text into columns (and rows) at the delimiters. =TEXTSPLIT("Tea,Coffee,Samosa", ",") Tea, Coffee, Samosa (spills across)
=TEXTSPLIT("a,b;c,d", ",", ";") a, b
c, d (rows and columns)
TRIM(text) Removes extra spaces. =TRIM(" Ravi Kumar ") Ravi Kumar
UPPER(text) The text in CAPITAL LETTERS. =UPPER("gstin") GSTIN
VALUE(text) A number written as text, as a number. =VALUE("1,250") 1250
=VALUE("18%") 0.18

Logical

Tests and choices with TRUE and FALSE, and LET and LAMBDA for naming parts of a formula and making functions of your own.

Function What it does Example Result
AND(logical1, [logical2], …) TRUE when every argument is TRUE. =AND(TRUE, 5 > 3) TRUE
=AND(10 > 5, 2 > 3) FALSE
BYCOL(array, lambda) Calls a LAMBDA on each column of an array and gives one result per column. =BYCOL({1, 2; 3, 4}, LAMBDA(c, SUM(c))) 4, 6 (each column's sum)
BYROW(array, lambda) Calls a LAMBDA on each row of an array and gives one result per row. =BYROW({1, 2; 3, 4}, LAMBDA(r, SUM(r))) 3
7 (each row's sum)
FALSE() The logical value FALSE. =FALSE() FALSE
IF(logical_test, [value_if_true], [value_if_false]) One value when a condition is TRUE, another when it is FALSE. =IF(75 >= 40, "Pass", "Fail") Pass
=IF(B2 > 10, "Bulk", "Single") Bulk (Tea's Qty is 12)
IFERROR(value, value_if_error) The value, or another one when it is an error. =IFERROR(10 / 0, "Can't divide") Can't divide
=IFERROR(10 / 2, "Can't divide") 5
IFNA(value, value_if_na) The value, or another one when it is #N/A. =IFNA(MATCH("Milk", A2:A5, 0), "Not found") Not found
IFS(logical_test1, value_if_true1, …) The value for the first condition that is TRUE. =IFS(85 >= 90, "A", 85 >= 75, "B", TRUE, "C") B
LAMBDA([parameter1, …], calculation) A calculation of your own, with parameters. Give it a name in Name Manager to use it like a function. =LET(double, LAMBDA(x, x * 2), double(21)) 42 (a function made on the spot, named with LET, then used)
=MAP({1, 2, 3}, LAMBDA(x, x + 10)) 11, 12, 13 (given to MAP)
LET(name1, value1, [name2, value2], …, calculation) Names values inside a formula, so each one is worked out once. =LET(rate, 18%, base, 1000, base * (1 + rate)) 1180 (names for the parts of a formula)
MAKEARRAY(rows, columns, lambda) An array of a size you give, each value from a LAMBDA of its row and column. =MAKEARRAY(3, 3, LAMBDA(r, c, r * c)) 1, 2, 3
2, 4, 6
3, 6, 9 (a times table)
MAP(array1, [array2], …, lambda) Calls a LAMBDA on each value of the arrays and gives an array of the results. =MAP({1, 2, 3}, LAMBDA(x, x * x)) 1, 4, 9 (each squared)
NOT(logical) Turns TRUE into FALSE and FALSE into TRUE. =NOT(TRUE) FALSE
=NOT(5 > 10) TRUE
OR(logical1, [logical2], …) TRUE when any argument is TRUE. =OR(FALSE, 5 > 3) TRUE
=OR(1 > 2, 3 > 4) FALSE
REDUCE([initial_value], array, lambda) Runs a LAMBDA over each value of an array, carrying a total along, and gives the last total. =REDUCE(0, {1, 2, 3, 4}, LAMBDA(a, x, a + x)) 10 (a running total, the last value)
SCAN([initial_value], array, lambda) As REDUCE, but gives the running total at every value. =SCAN(0, {1, 2, 3, 4}, LAMBDA(a, x, a + x)) 1, 3, 6, 10 (the running totals)
SWITCH(expression, value1, result1, …, [default]) The result for the first value that matches. =SWITCH(2, 1, "Mon", 2, "Tue", 3, "Wed", "Other") Tue
=SWITCH(9, 1, "Mon", 2, "Tue", "Other") Other
TRUE() The logical value TRUE. =TRUE() TRUE
XOR(logical1, [logical2], …) TRUE when an odd number of arguments are TRUE. =XOR(TRUE, FALSE) TRUE
=XOR(TRUE, TRUE) FALSE

Information

Tests that say what kind of value a cell holds.

Function What it does Example Result
ISBLANK(value) TRUE when the cell is empty. =ISBLANK(D1) TRUE (D1 is empty)
=ISBLANK(A1) FALSE
ISERR(value) TRUE for any error except #N/A. =ISERR(1 / 0) TRUE
=ISERR(NA()) FALSE
ISERROR(value) TRUE for any error. =ISERROR(1 / 0) TRUE
=ISERROR(5) FALSE
ISEVEN(number) TRUE when the number is even. =ISEVEN(42) TRUE
=ISEVEN(7) FALSE
ISLOGICAL(value) TRUE for TRUE or FALSE. =ISLOGICAL(TRUE) TRUE
=ISLOGICAL(1) FALSE
ISNA(value) TRUE for #N/A. =ISNA(NA()) TRUE
=ISNA(MATCH("Milk", A2:A5, 0)) TRUE
ISNONTEXT(value) TRUE when the value isn't text. =ISNONTEXT(42) TRUE
=ISNONTEXT("Tea") FALSE
ISNUMBER(value) TRUE when the value is a number. =ISNUMBER(42) TRUE
=ISNUMBER("42") FALSE
ISODD(number) TRUE when the number is odd. =ISODD(7) TRUE
=ISODD(42) FALSE
ISREF(value) TRUE when the value is a reference. =ISREF(A1) TRUE
=ISREF("A1") FALSE
ISTEXT(value) TRUE when the value is text. =ISTEXT("Tea") TRUE
=ISTEXT(42) FALSE
N(value) The value as a number. =N(42) 42
=N("Tea") 0
NA() The error value #N/A. =NA() #N/A (the #N/A error, on purpose)
=ISNA(NA()) TRUE
TYPE(value) 1 number, 2 text, 4 logical, 16 error, 64 array. =TYPE(42) 1
=TYPE("Tea") 2