# This Stardew Valley player has pig-keeping profitability down to a literal science

When it comes to making money in Stardew Valley, this player has crunched the numbers to help you maximize those agricultural profits.

One thread on the Stardew Valley subreddit – entitled "I like money, okay?" – shows user Logical-Knowledge-15's moneymaking machine at work. With all these pigs to sniff out truffles they're sure to be making bank, right?

Wrong. Or at least, they could be using their farmyard space a bit more strategically, according to a reply from HiIlmEden-r. "Okay, I had a thought that you may be losing money with that setup, so I used math to check it," they said. You'll want to brace yourself for this next bit; there are a lot of numbers involved.

After working it out practically using the tile-based system of Stardew Valley, HiIlmEden-r deduced that they could fit nine Deluxe Barns into the space rather than just five. "If filled to full you have 168 pigs, giving you up to three truffles a day [per pig]. That's 504 truffles a day," going on to state how "best quality sells for 1250g" a pop. Therefore, Logical-Knowledge-15 could be "walking away with 630,000g a day."

Pair that with the 20% chance for a double harvest of truffles, and that would bring you to an average of 756,000 gold each day. You'll of course be spending about 8400 gold daily to feed your horde of hogs, but that still leaves you plenty left over in exchange for a bunch of fancy mushrooms. This strategy means you'd be rolling in riches for three seasons a year, but since your pigs are barn-bound for the whole of winter, it's best to save up first. As Logical-Knowledge-15 said: "I earn a lot of money :) And then Winter comes :(".

But all good things come at a price, and the same is true here since you'd have to build the barns first. The price to build nine Deluxe Barns would set you back 602,000 in gold, 18,900 wood, and 9,100 stone. "A tree gives you around 21 wood per tree with the stump," HiIlmEden-r helpfully pointed out, meaning you'd need to chop down about 900 trees.

You'd also need a cool "2688000g just for the pigs", if you want to fully populate each barn as per this strategy. Be sure to grab some of the best Stardew Valley mods if you do, since the auto-petter will save you loads of time when tending to nearly 200 animals.

All of this tallies up to an eyewatering 5,145,000 in gold expenditure if you want to achieve a mathematically-optimized farm. Hey, it's called agricultural science for a reason.

Check out these other games like Stardew Valley for peaceful, pixellated RPG goodness.