LAMBDA · Financial
Prorate a month LAMBDA
xl.prorate.month splits a monthly amount across the inclusive days you occupied. Rent of $3,100 for January 2026, from the 15th through the 31st, is $1,700.
Syntax =xl.prorate.month(amount, start_day, end_day)
=LAMBDA(amount, start_day, end_day,
LET(
days, end_day - start_day + 1,
dim, DAY(EOMONTH(start_day, 0)),
amount * days / dim
)
)Arguments
| Name | Required | What to pass |
|---|---|---|
| amount | Required | The full-month amount, such as rent. |
| start_day | Required | The first occupied day. It must be in the same month as end_day. |
| end_day | Required | The last occupied day, inclusive. |
Examples
Move-in on January 15, 2026
=xl.prorate.month(3100, DATE(2026,1,15), DATE(2026,1,31))Result $1,700
| A | B | |
|---|---|---|
| 1 | Rent | 3100 |
| 2 | Start | 1/15/2026 |
| 3 | End | 1/31/2026 |
| 4 | Prorated | 1700 |
xl.prorate.month is move-in and move-out rent. A $3,100 January rent, occupied from January 15 through January 31, covers 17 of January’s 31 days. 3100 × 17 / 31 is exactly $1,700.
Both ends count. Leaving on the 15th of a 31-day month, having arrived the 15th, is one day, not zero.
Add it to the workbook
Copy the formula in the block above, including the line breaks. Choose Formulas, Name Manager, New. Set the name to xl.prorate.month, the scope to Workbook, and paste into Refers to. Excel Labs can do the same step: open the Advanced Formula Environment, add that name, and save it back to the workbook. A cell then calls =xl.prorate.month(...).
The name needs Microsoft 365, Excel 2024, or Excel for the web. Excel 2021 returns #NAME? for LAMBDA even when it already has XLOOKUP, FILTER, or LET.
How it works
The occupied days are end − start + 1. The month length is the day number of EOMONTH of the start, which is 28, 29, 30, or 31. The amount is multiplied by the fraction.
Limits
The start and end must be in the same month. A stay that crosses February 1 has to be two calls, one per month, because the two months have different lengths. The function does not round to the cent. ROUND the result if the landlord’s lease says cents.