Dairy Farm Budget: Test Milk Price Scenarios With ChatGPT

Coding Liquids tutorial cover featuring Sagnik Bhattacharya for Dairy Farm Budget: Test Milk Price Scenarios With ChatGPT.
Coding Liquids tutorial cover featuring Sagnik Bhattacharya for Dairy Farm Budget: Test Milk Price Scenarios With ChatGPT.

Build the budget per cow first: milk income, feed and other variable costs, labour, and fixed costs, then divide by cows. Give those figures to ChatGPT as a table and ask it to rerun the profit at six milk prices you choose, spanning your break-even. It does the arithmetic; you set the range and check it.

Milk price is the number a dairy farmer controls least and feels most. A budget with a single price tells you what happens if everything goes to plan. A budget with six prices, side by side, tells you how far the price can fall before you are losing money and which changes, such as a smaller herd or lower labour, move that line most.

Follow me on Instagram@sagnikteaches

A real story about fewer cows, used as the example

In June 2022, Dairy Herd Management ran a piece on a family dairy that downsized to overcome its labour problems: soaring labour costs and a lack of available workers pushed the family to rethink how they milked, and they cut the herd to a size the family could run sustainably. The piece is about labour and the family's reasons, not a profit comparison.

Connect on LinkedInSagnik Bhattacharya

That makes it a good case for a budget, because the question it raises is one every dairy farmer asks: if I milk fewer cows with much less paid labour, am I better or worse off, and does the answer change with the milk price? The figures below are my own illustration built around that kind of change: a 210-cow herd milked three times a day with three full-time employees and 120 paid hours a week, against 170 cows milked twice a day by part-time help working 20 paid hours a week. They are not that farm's accounts, and you should replace every input with yours.

Subscribe on YouTube@sagnikteaches

The inputs: one herd, two ways of running it

Milk is priced in hundredweight (cwt), meaning 100 pounds of milk. A cow giving 24,000 pounds a year produces 240 cwt. All dollar figures below are illustrative.

InputFull herdSmaller herd
Cows milked210170
Milk per cow per year (lb)24,00025,000
Milk sold (cwt)50,40042,500
Variable costs per cow (feed, vet, breeding, bedding, hauling)$4,200$4,200
Paid labour120 h a week at $18 loaded = $112,32020 h a week at $14 loaded = $14,560
Family labour valuedNone1,500 h at $20 = $30,000
Fixed costs (interest, insurance, depreciation, repairs, land)$90,000$90,000

Two assumptions deserve comment. Milk per cow rises by a thousand pounds in the smaller herd because less crowding and less rushed milking tend to help, but that is an assumption to test against your own records, not a promise. And the family labour line is the honest one: when paid labour falls, someone still does the work. If you leave that unpaid time at zero, the smaller herd looks better than it is.

The Complete Excel Course with AI Integration thumbnail

The Complete Excel Course with AI Integration

From formulas and pivot tables to Power Query, DAX, VBA and AI with Copilot, ChatGPT and Claude — hands-on from the first lesson.

By Sagnik Bhattacharya and Virginia Thorn, Primetime Emmy Award winner

Buy now

The result at a milk price of $22 per cwt

Take a net milk price of $22 per cwt, meaning what actually arrives after deductions. Full herd: 50,400 cwt × $22 = $1,108,800 of milk income. Costs: 210 × $4,200 = $882,000 variable, plus $112,320 labour, plus $90,000 fixed, a total of $1,084,320. Net: $24,480, or $117 per cow.

Smaller herd: 42,500 cwt × $22 = $935,000. Costs: 170 × $4,200 = $714,000, plus $14,560 paid labour, $30,000 family labour and $90,000 fixed, a total of $848,560. Net: $86,440, or $508 per cow.

Fewer cows made more money in this illustration, and almost all of the difference came from labour: paid labour fell by about $98,000 (about $68,000 once the family's extra hours are costed) while milk income fell by about $174,000 and variable costs by $168,000. That is the pattern to look for in your own numbers. The cows you stop milking had to cover their own costs and a share of the labour, and the lowest-margin cows may not have done so.

The what-if table

Now vary the milk price. For each $1 per cwt, the full herd's income moves by $50,400 and the smaller herd's by $42,500. Break-even milk price is total cost divided by hundredweight sold: $1,084,320 ÷ 50,400 = $21.51 for the full herd, and $848,560 ÷ 42,500 = $19.97 for the smaller one.

Net milk price per cwtFull herd netPer cowSmaller herd netPer cow
$17-$227,520-$1,083-$126,060-$742
$19-$126,720-$603-$41,060-$242
$21-$25,920-$123$43,940$258
$22$24,480$117$86,440$508
$24$125,280$597$171,440$1,008
$26$226,080$1,077$256,440$1,508

Read the table sideways. Both farms lose money at $19, but the smaller herd loses less than half as much per cow. Both lose heavily at $17, so the lesson is about cash, not just profit: how many months of $17 can the farm fund? That question connects to cash flow, and a plain-English guide to cash flow forecasting shows how to turn the annual figure into a month-by-month view.

One caution. The larger herd gains more per cwt when prices rise, since it sells more milk. At $26 the full herd's gap to the smaller herd has narrowed from $62,000 to $30,000. A smaller herd is a defensive position, which is worth having when prices are weak and costs sticky, and worth reviewing when prices recover.

Getting ChatGPT to run it

Paste your inputs as a table, and write the prompt so nothing is assumed. In the first version of the prompt:

I run a dairy farm. Below are my budget inputs for two options: Full herd and Smaller herd. Use ONLY these figures.
[paste the input table]
Tasks:
1. For each option calculate milk sold (cwt), milk income at a net price of $22/cwt, total variable cost, total labour (paid plus family), fixed costs, total cost, net profit and net profit per cow.
2. Calculate the break-even net milk price for each option.
3. Show net profit and profit per cow for each option at $17, $19, $21, $22, $24 and $26 per cwt, in one table.
4. Tell me how much net profit changes for each $1 per cwt move in the milk price, for each option.
Show every formula in words next to the result. If any input is missing, leave it blank and list it under "Missing" rather than assuming a value.

It should return numbers like the tables above. Do not trust them yet. Take a pen to three of them: milk sold (cows times pounds divided by 100), total cost, and one row of the what-if table. If all three match, the rest almost certainly does too; if any is off, find out why before you use the table. Ask it to give you the spreadsheet formulas as well, so the model lives in your own file. If net profit sits in B10, milk price in B2 and cwt in B4, the profit cell is simply:

=B4*B2-B6-B7-B8-B9

with variable cost, paid labour, family labour and fixed costs in B6 to B9. Then a data table or a column of prices gives you the what-if without any AI at all. The guide to using ChatGPT with Excel explains how to ask for formulas like this and how to test them.

Asking better questions of the same table

Once the table exists, the follow-ups are where an assistant earns its time. Try these, each as a separate message with the inputs still in view:

  • "At what net milk price does the smaller herd break even if feed costs rise by 10%?" (Illustrative answer: feed is only part of the $4,200 variable cost; if feed is $3,300 of it, a 10% rise adds $330 per cow, or $56,100 across 170 cows, and the break-even rises by about $1.32 to roughly $21.29.)
  • "If I milk 160 cows instead of 170, but at the same milk per cow, what happens at $22?" Cutting ten more cows removes their income and their variable costs, so the answer depends on whether each cow earns more than $4,200 of variable cost: here each cow makes 250 cwt × $22 = $5,500, a margin of $1,300 over variable costs, so ten fewer cows lowers profit by $13,000 unless it also saves labour or fixed cost.
  • "What milk per cow do I need for the smaller herd to match the full herd's profit at $20?" This one the assistant can solve by trial. Check its answer by plugging it back in.

That second question is the most useful habit in the whole exercise: compare each cow's margin over variable cost with what she costs you to keep. Lowest-margin cows are where a herd reduction should start, and the records for finding them are covered in analysing milk and DHI records in ChatGPT.

A second variable: what if feed moves as well?

Milk price rarely moves alone. When grain prices rise, milk prices often do not follow in time, so the cases that hurt are price down and feed up together. A two-way grid shows this, and it is one of the easiest things to ask an assistant to produce once the single-price table works. Assume feed is $3,300 of each cow's $4,200 variable costs, so a 10% feed rise adds $330 a cow, or $56,100 across 170 cows. Smaller herd, net profit, illustrative:

Net milk priceFeed -10%Feed as budgetedFeed +10%Feed +20%
$19$15,040-$41,060-$97,160-$153,260
$21$100,040$43,940-$12,160-$68,260
$22$142,540$86,440$30,340-$25,760
$24$227,540$171,440$115,340$59,240

The grid makes a point the single table could not: a 10% feed rise is worth about $1.32 of milk price, so a farm that sits just above break-even can be tipped over by feed alone. It also shows which cells you can live with. A farm with little cash behind it needs every cell in the likely range to stay above zero, or a plan for the cells that do not. The grid is also the right place for forward-buying decisions: if the "+20%" column frightens you, pricing part of next year's feed now becomes a budget question with a number attached.

When you ask for the grid, tell the assistant the axes and the steps yourself, and have it show the formula for one cell so you can reproduce it. A typical instruction: "Rows are net milk prices of $19, $21, $22 and $24. Columns are feed cost changes of -10%, 0, +10% and +20% on the feed share of variable cost, which is $3,300 per cow. Show the formula for the $21 row, +10% column." If you cannot match its cell by hand, ask it to try again with the working shown.

What the downsizing story does not tell you

It is worth keeping a healthy suspicion of any single farm's story, including the one above. The report described a labour problem and its answer, not a profit comparison, so the budget here shows what the arithmetic can look like, not what that family earned. Several things can reverse the result:

  • Fixed costs that do not shrink. If you carry a loan for a parlour and freestalls built for 210 cows, 170 cows carry the same payments. Check the fixed-cost line before you assume the herd can shrink painlessly.
  • The cows that leave. Culling your lowest-margin cows helps; culling at random does not. Milk per cow rises only if the animals you remove were below average.
  • Family time. Unpaid hours have a limit, and a budget that needs 1,500 family hours a year works only while the family can supply them. Put a cost on them, and think about illness and holidays.
  • Milk contracts and quotas on volume. Some buyers set minimum supply or penalise changes in volume. Read yours before you reduce the herd.

Use the assistant to test each of these as a scenario. A line such as "Assume fixed costs rise 15% as lender fees increase" takes seconds to run and may change the conclusion. The decision stays with you and your adviser, and the numbers are a way to make the argument concrete rather than to settle it.

Margin per cow, three ways

People use "margin per cow" for different things, and mixing them causes arguments. Decide which one you are looking at:

MeasureFormulaSmaller herd at $22What it answers
Margin over variable costsMilk income per cow minus variable costs per cow$5,500 - $4,200 = $1,300Does this cow cover what she directly costs?
Margin after labourAbove, minus labour per cow$1,300 - $262 = $1,038Does she cover the people who milk her?
Net margin per cowNet profit divided by cows$508What is left for the business after everything?

(Labour per cow in the smaller herd is $44,560 divided by 170, which is $262.) Use the first measure to decide which cows to keep, the second to compare labour set-ups, and the third to decide whether the business works.

Using the headline price when the cheque says otherwise

A farmer built a budget at the announced price of $22 per cwt and found, six months in, that the milk cheque never reached it. The announced price was before hauling charges, co-operative or processor deductions and other assessments, and the farm's component levels moved the final figure up or down. The real net price was about $20.40, which in the full-herd model above is a swing of more than $80,000 a year (50,400 cwt × $1.60).

The fix was to rebuild the price input from the last twelve milk statements: total net milk cheques divided by total hundredweight shipped, with deductions left in. Then the budget's what-if range ran from that figure, not the headline. Since then, one of the first lines of the prompt has been "use net price after all deductions". If your budget has a milk price, ask where it came from. Of all the inputs, this is the one most often taken from the wrong place.

What to put in the budget besides milk and feed

The example kept costs in four lumps. A budget for your own farm should separate the lines you can move from the ones you cannot, so scenarios mean something:

  • Feed: purchased and home-grown, per cow per day. Value home-grown feed at what it would sell for, or the budget flatters you.
  • Herd health and breeding: veterinary, medicines, semen, milk testing.
  • Replacements: the cost of raising or buying heifers, net of cull cow sales. A lower cull rate shows up here, and herds that keep cows longer carry less of this cost per cwt.
  • Labour: paid, plus family time at an honest rate.
  • Utilities, hauling, bedding, repairs and supplies.
  • Interest and principal payments: principal is not an expense for profit, but it is a call on cash, so show it in the cash view.
  • Insurance, any margin or price-protection programme premiums, and land costs.

If a price-protection or forward contract applies to part of your milk, enter that portion at its contracted price and the rest at the scenario price. Ask your adviser before you model a programme you do not fully understand, since payout rules differ by scheme and you should read yours.

From scenarios to a decision

Three questions turn the table into a decision, and the assistant can lay out the evidence for each, though the choice remains yours.

  1. How low can the price go before I run out of cash? Take the loss at your pessimistic price, subtract any cash reserve and undrawn credit, and see how many months it lasts. A loss of $41,060 a year at $19, for instance, is about $3,400 a month.
  2. Which lever is cheapest to pull? Compare a $1 per cwt move in price (outside your control) with a $200 per cow cut in variable cost, a 1,000 lb rise in milk per cow, or a 20-hour-a-week cut in paid labour. In the example above, 20 fewer paid hours a week at $18 saves about $18,700 a year, close to the effect of a 37-cent move in the milk price on the full herd.
  3. What would make me wrong? List the three inputs you are least sure of, and run the scenario table with each one worse. If the answer flips, that input needs better data before you decide anything.

The tutorial on herd manager jobs costed per cow is a good companion, since it prices the other jobs AI could take on in the same per-cow terms.

Keeping the budget alive

A budget built once a year goes stale by spring. Keep it in a spreadsheet you own, with one input sheet and one results sheet. Each quarter, replace the milk price with your last three statements' net figure, update feed from the latest invoices, and paste the same prompt back into the same conversation with the new inputs. Save the old and new tables side by side. If the break-even milk price moves up by more than a dollar between quarters, work out which input caused it before you do anything else.

Budget figures are not sensitive in the way bank details are, but use judgement all the same. Strip lender names, account numbers and any information about family members or employees. A table of totals and per-cow figures is all the assistant needs.

Questions from dairy farmers about budget scenarios

Can ChatGPT forecast the milk price?

No, and you should not ask it to. Use it to test a range of prices you choose, such as six prices spread around your current and break-even figures, and see what each does to profit. The range is your judgement; the arithmetic is the assistant's job.

What is a break-even milk price?

It is the milk price at which your budgeted profit is zero after all costs, including labour and fixed costs. Divide total costs by hundredweight of milk sold, then check it against the net price on your milk cheque, not the headline price.

Should the budget be per cow or for the whole farm?

Both. Build the farm totals, then divide by cows so you can compare years and herd sizes. Per-cow margin shows whether each cow earns her place; farm totals show whether the business covers debt and fixed costs.

How do I stop the AI inventing numbers?

Give it your own figures in a table, tell it to use nothing else, and ask it to leave blank any figure you did not supply. Then recompute the headline result in a spreadsheet yourself before acting on any scenario.

Is it safe to paste farm financials into ChatGPT?

Remove names, account numbers and lender details, and use a plan whose terms say your content is not used for training. Budget totals and per-cow figures are enough for this job, so there is no need to paste bank statements.

Further reads

Sources: Dairy Herd Management (dairyherd.com), June 2022 report on a family dairy that downsized its herd to overcome labour challenges; all herd sizes, hours and budget figures in this tutorial are illustrative and are not that farm's accounts.

Want your farm budget set up to test its own numbers?

On a 1:1 call we can build the per-cow budget from your own costs, decide which milk price and feed cost ranges to test, and set up the prompts so you can rerun them each quarter.

Book a 1:1 call with me