
- What is accounts payable?
- The accounts payable formula for ending AP
- How to calculate accounts payable at period end
- How to calculate average accounts payable
- How to forecast accounts payable
- Related accounts payable formulas
- Common mistakes when calculating accounts payable
- Keep your AP balance current with Ramp Bill Pay

Knowing how to calculate accounts payable starts with three numbers from your ledger. Your ending AP balance equals beginning AP plus credit purchases minus payments to suppliers.
From that balance, you can work out average AP and project what you'll owe suppliers in future months. Each figure feeds your close and your cash plan.
What is accounts payable?
Accounts payable (AP) is the money you owe suppliers for goods and services you received on credit but haven't paid for yet. AP clerks and specialists keep the balance current by entering invoices and applying payments. Controllers rely on it to close the books, and finance leaders use it to plan cash.
AP is a current liability, reported with your other short-term obligations as accounts payable on a balance sheet. If the AP balance is wrong, your liabilities and your cash forecast are wrong with it.
The accounts payable formula for ending AP
The ending AP formula is:
Ending AP= Beginning AP + Credit purchases – Payments to suppliers
Each input comes from records you already keep:
| Input | What it includes | Where to find it |
|---|---|---|
| Beginning AP | The closing AP balance from the prior period | Prior month's general ledger or AP aging report |
| Credit purchases | Invoices you received and recorded on credit terms during the period | AP subledger or purchases journal |
| Payments to suppliers | Cash, check, ACH, or card payments applied to those invoices | Cash disbursements journal or bank statements |
The formula works as a roll-forward. March's ending balance becomes April's beginning balance, so an error in one month carries into every month after it.
How to calculate accounts payable at period end
You can calculate the accounts payable balance for any period in four steps using your general ledger (GL) and AP subledger. Assume you're closing March.
1. Pull your beginning AP balance
Start with the prior period's closing AP from the general ledger or AP aging report. Use the figure after February's close is final, so late adjustments are already in it. Beginning AP on March 1 is $40,000.
A wrong starting figure throws off every step that follows.
2. Add new credit purchases for the period
Add every invoice you received and recorded on credit during March. Leave out cash purchases, since you paid for those at the time of purchase and they never reached AP. March credit purchases total $95,000.
Counting cash purchases here overstates what you owe.
3. Subtract payments made to suppliers
Subtract every payment applied to AP during the period, whether by cash, check, ACH, or card. Count each payment on the date you apply it to the invoice. March payments total $85,000.
A missed payment leaves a liability on your books that you've already settled.
4. Calculate and reconcile the ending balance
$40,000 + $95,000 – $85,000 = $50,000 ending AP on March 31.
| Line item | Amount |
|---|---|
| Beginning AP (March 1) | $40,000 |
| Credit purchases | $95,000 |
| Payments to suppliers | ($85,000) |
| Ending AP (March 31) | $50,000 |
That $50,000 becomes the current liability you show for accounts payable on a balance sheet at March 31. Before you close, tie the result to your AP subledger or aging report. A mismatch usually points to unrecorded invoices, duplicate entries, or payments applied to the wrong vendor.
Fix the mismatch before close, or the error rolls into April's beginning balance.
How to calculate average accounts payable
The average accounts payable formula is:
Average AP= (Beginning AP + Ending AP) / 2
Using the March figures, ($40,000 + $50,000) / 2 = $45,000. Use average AP instead of ending AP whenever you calculate turnover or days payable outstanding (DPO). Those ratios measure activity across a full period, and a single month-end balance can swing on one large invoice.
For a quarter or a year, the average accounts payable formula uses every month-end balance. A $30,000 equipment invoice that posts on January 31 inflates that month's balance, and averaging 3 months dilutes it.
- Pull the ending AP balance for each month in the period.
- Add the balances together.
- Divide the total by the number of balances.
| Month | Ending AP |
|---|---|
| January | $43,000 |
| February | $51,000 |
| March | $50,000 |
| Q1 average | $48,000 |
($43,000 + $51,000 + $50,000) / 3 = $48,000
A quarterly average keeps one large invoice from distorting your turnover and DPO.
How to forecast accounts payable
Two standard methods cover most AP forecasts. Pick percentage of purchases when your purchasing volume and vendor payment terms hold steady, and pick the DPO-based method when purchasing is seasonal or uneven.
| Method | Formula | Best for | Inputs you need |
|---|---|---|---|
| Percentage of purchases | Forecasted credit purchases * Historical % unpaid at period end | Steady purchasing volume and vendor terms | Purchase forecast and 6–12 months of AP and purchase history |
| DPO-based | (DPO * Forecasted COGS) / Days in period | Seasonal or uneven purchasing | Historical DPO and a COGS forecast |
1. Use the percentage-of-purchases method
The percentage-of-purchases method uses this formula:
Forecasted AP= Forecasted credit purchases * Historical % of purchases still unpaid at period end
To find the percentage, divide each month-end AP balance by that month's credit purchases, then average the results over the last 6–12 months. Say your history shows 40% of purchases still unpaid at month-end, and you forecast $120,000 in credit purchases. Forecasted AP is:
$120,000 * 40% = $48,000
The estimate holds as long as your vendor terms stay the same.
2. Use the DPO-based method
The DPO-based method uses this formula:
Forecasted AP= (DPO * Forecasted COGS) / 365
For shorter periods, replace 365 with the number of days in the period, such as 90 for a quarter. If your DPO is 45 days and you forecast $1,460,000 in annual COGS, forecasted AP is:
(45 * $1,460,000) / 365 = $180,000
Because it ties AP to cost of sales, the forecast moves with seasonal swings in purchasing.
3. Roll the forecast forward each period
Whichever forecasting formula you start with, apply the ending AP formula to projected figures:
Ending AP = Projected beginning AP + Scheduled credit purchases – Scheduled payments
Starting April at $50,000, with $100,000 in scheduled purchases and $92,000 in scheduled payments, projected AP on April 30 is $58,000.
Update the projection monthly and compare it to actual AP after each close. If the variance tops 5%, check for invoices that arrived late or payment runs that slipped.
Each comparison makes the next forecast more accurate.
Related accounts payable formulas
Accounts payable turnover ratio
The accounts payable turnover ratio formula is:
AP turnover= Total credit purchases / Average AP
With March credit purchases of $95,000 and average AP of $45,000, turnover is about 2.1 for the month. Track accounts payable turnover month over month to see how quickly you pay suppliers.
Days payable outstanding
This is how to calculate days payable outstanding:
DPO= (Average AP / COGS) * Number of days in the period
Some teams call this the AP days formula or the accounts payable period formula. Days payable outstanding measures the average number of days you take to pay suppliers.
Both ratios use average AP, so an error in the average skews both.
Common mistakes when calculating accounts payable
Mixing cash purchases into credit purchases
Adding cash purchases to credit purchases overstates ending AP by the full amount of those purchases. Pull credit purchases from the AP subledger only, and cash buys stay out of the balance.
Using a stale balance from before late invoices posted
Pulling AP before late invoices post understates the balance by whatever arrived in the final days of the month. Lock the number only after your cutoff passes, such as 5 business days after month-end.
Using ending AP where a formula calls for average AP
Plugging ending AP into turnover or DPO ties the ratio to whatever happened on the last day of the period. Use average AP for both ratios, and a single large invoice won't move the result.
Counting partial payments or credit memos twice
Recording a partial payment or credit memo against the invoice and again as a separate entry reduces AP twice. Apply each one once against the original invoice, and your balance will match the vendor's statement.
Keep your AP balance current with Ramp Bill Pay
An AP balance you calculate by hand reflects the ledger on the day you pulled it. By the time you report AP or DPO at close, new invoices have arrived and more payments have cleared. You end up making decisions on a number that's already out of date.
Ramp Bill Pay keeps your AP balance and DPO current as invoices arrive and payments go out. Bill Pay captures and codes each invoice on arrival, routes approvals without email chasing, and records every payment as it's sent. The balance syncs to your ERP, so your controller gets an accurate month-end figure without a manual roll-forward.
With Bill Pay, keeping AP current looks like this:
- Process bills with fewer clicks: AP clerks process bills with 86% fewer clicks than legacy AP tools.
- Save time on every invoice: AP Agents code invoices from your own coding history, saving about 2.5 minutes per bill compared with rules-based automation.
- Catch duplicate bills before they post: AP Agents flag duplicates, so your balance doesn't count the same invoice twice.
- Close with a balance that matches your ERP: Two-way sync updates payment status in Ramp using the actual ERP payment date.
Try an interactive demo to see how Ramp keeps your accounts payable balance current and why the median Ramp customer saves 7.5% on expenses in their first year.

FAQs
The AP days formula is DPO= (Average AP / COGS) * Number of days in the period. It's another name for days payable outstanding. Match the days count to the period your COGS covers, or the result will be off.
Payables turnover = Total credit purchases / Average AP. Calculate accounts payable turnover with both inputs drawn from the same period. Mismatched periods produce a misleading ratio.
A credit purchase raises liabilities and assets (or expenses) by the same amount. Paying the invoice lowers cash and AP equally. The equation stays balanced at every step.
Yes. AP is a current liability because you'll pay it within 12 months. It appears with your other short-term obligations as accounts payable on a balance sheet. Misstating it misstates your working capital.
Yes. AP is a core accounting function that records and pays what you owe suppliers. Every AP entry feeds the general ledger, so AP accuracy affects how quickly you can close.
“I want to trust the people at our sites to buy what they need, when they need it. With everything in Ramp, they have one place to go and one set of rules to follow. And I can see how all of their spending ties back to the contracts that fund their work.”
Marina Peterson
CFO, Wu Yee Children’s Services

“Finance isn’t just there to keep a record of the past. Are we negotiating with a retail partner? We have a seat at that table. Looking at a brand partnership? We have a seat at that table too. That’s really the big unlock: finance can be a strategic partner across the business, while Ramp keeps day-to-day work from pulling us away.”
Rachel Prescott
CFO, Caraway

“I assumed I would have to choose between speed and control. What I found is that you can have both. A well-designed system takes friction out, for the finance function and for everyone else.”
Justin Webster
CFO, Denver Broncos

“A well-run district should not have to choose between getting work done at the school site and keeping control of the dollars behind it. We're not hiring more people to do more jobs, so we have to be smarter about the process. With Ramp, the purchase, the receipt, and the record stay together from the start. ”
Nick Brizeno
Director of Purchasing, San Marcos Unified School District

“In senior living, scale only works if the communities still feel personal. We needed the back office to carry more of the complexity, not the people serving residents. Ramp helped us build that infrastructure, so the experience in the community could stay human.”
Ryan Cole
CFO, Agemark Senior Living

“AI is moving faster than the finance context around it. Prices change, models change, and the value is not always obvious from an invoice. We needed enough detail to know which bets deserved more investment — and which ones did not.”
Greg Cooley
Controller, AngelList

“Invoices, cards, tokens. The categories change but the principle doesn't: know where the money is going, remove the work around it, and make sure the spend is worth it.”
Maciej Mylik. Finance
ElevenLabs

“We weren’t trying to retrofit an old finance system. We had a blank canvas, and Ramp gave us the foundation to build a global finance function of the future.”
Justin Dourado
Director of Finance, Othership



