Karl Marx was so broke in 1859 he couldn’t afford the postage stamps to mail off his new manuscript, leading the philosopher to lament, “I don’t suppose anyone has ever written about ‘money’ when so short the stuff.”

He was probably right about that. However, the most famous book about money written by someone strapped for cash wasn’t “Das Kapital” or “The Communist Manifesto.” It was “A Christmas Carol.”

Charles Dickens suffered not only a personal-finance crisis but a creative one, as well, in the fall of 1843, when, in a sort of literary Hail Mary pass, he committed to writing a Christmas book in an impossible six weeks. And, in a plot twist as improbable as anything he himself could have come up with, this gambit actually worked: “A Christmas Carol” became one of the best-selling and most widely adapted books of all time, a work that shaped the very meaning of the holiday itself, and singlehandedly wiped out the goose market — more on that later.

This remarkable tale, recounted in Les Standiford’s biography, “The Man Who Invented Christmas,” and just turned into a highly entertaining new movie of the same name starring Dan Stevens and Christopher Plummer, holds financial lessons for everyone, especially those of us who’ve been tormented by the ghosts of bills past due and deadlines soon to come.

Dickens was in debt: to begin with. There is no doubt whatever about that.

Sales of his two most recent novels were so disappointing that his publishers cut his pay. Meanwhile, the 31-year-old author and social-justice warrior had just moved into a larger, and much more expensive, home to accommodate the birth of his fifth child (like Marx, his pecuniary troubles stemmed somewhat from the age-old failure to live within one’s means).

On top of all this, his relatives, including his chronically deadbeat dad, kept hitting him up for money. His father, who later inspired the beloved character Wilkins Micawber in “David Copperfield,” was so hopeless with money that Dickens rented his parents a cottage far out in the country, where he hoped it would be harder for them to overspend.

“For Dickens this was all kind of galling because he had been working so hard and he didn’t have much to show for it,” said Declan Kiely, curator of a terrific ongoing exhibit on Dickens at the Morgan Library in New York.

When Scrooge berates his cheerful nephew Fred, “What’s Christmas time to you but a time for paying bills without money; a time for finding yourself a year older, but not an hour richer?” that could just as well have been Dickens ranting.

“One of the eruptive forces that gave rise to Ebenezer Scrooge is the fact that Dickens was probably feeling fairly stingy himself,” Kiely said.

Money was the hero and villain of Dickens’s life, much as it was for Scrooge. The most Dickensian thing to ever happen to Dickens, the childhood trauma that forged the man, in fact, all stemmed from an unpaid tab with the baker for £42. This delinquent account gets his father tossed in the Marshalsea debtors prison, causing young Dickens to be pulled from school and forced to toil in a boot-blacking factory.

ALSO SEE: Want to get rich? Read fiction

That past nightmare combined with his present financial stress in 1843 is what sparks Dickens to invent the most famous miser of all time, a man who puts himself to bed reading his accounting ledger, a man who calls Christmas a “humbug,” a man so set in his ways not even a visit from the ghost of his dead partner, Jacob Marley, doomed to walk the streets pulling a chain of bank boxes, is enough to make him rethink his attachment to money.

The reason we love “A Christmas Carol” is that Scrooge changes. He realizes his hoarded money is idle and cold, useless to himself and the world around him, and that he has invested his entire being in money itself and not what money is for. But the financial instrument of his imprisonment is also the key to his salvation.

We all have patterns of behavior, ideas about money, and misplaced priorities we’d like to reform, but Scrooge actually pulls it off, saving the lives of Tiny Tim and himself in the process — all thanks to a little help from some paranormal therapy.

In his book, “The Examined Life,” psychoanalyst Stephen Grosz says he uses “A Christmas Carol” in his courses to teach how therapy works and how people can change. “Scrooge doesn’t change because he’s frightened — he changes because he’s haunted. We can be frightened of gaining weight, but that alone probably won’t cause us to change our diet,” Grosz writes.

Dickens’s other insights, in Grosz’s view, are that facing up to the past, grieving for what and whom we have lost, is crucial to changing — however, it is only in the present, not the past or future — that we can actually change ourselves.

The success of “A Christmas Carol” bailed Dickens out of his immediate financial crisis, mostly. The book was such an instant sensation on both sides of the Atlantic that it also provided a shot in the arm to the then relatively minor holiday of Christmas itself. Even seemingly minor details such as the fact that Scrooge splurges on an immense turkey for the Cratchits, had an outsize impact, Standiford writes.

“Prior to this small moment at the end of Dickens’s tale,” according to Standiford, “the traditional bird for the well-provisioned Christmas table in England was the goose, and the impact of ‘A Christmas Carol’ was said to have sent the nation’s goose-raising industry to near ruin.”

But Dickens was not changed quite so much as Scrooge. Though “A Christmas Carol” was a huge success, the author went so overboard with the quality, binding and four-color illustrations of the initial printing, which he self-published — “rookie mistakes,” says Kiely — that it severely cut into his royalties.

Like his father, Dickens was a lifelong spendthrift, so much so that he ended up having to sell a quarter share of his earnings for the next eight years and let several insurance policies lapse to cover his bills. It wasn’t until a full decade after “A Christmas Carol” that he was financially comfortable for the first time in his life — ultimately, he ended up earning much more from selling tickets to his public readings than he did from his books themselves.

The original handwritten manuscript of “A Christmas Carol,” now on display at the Morgan Library, was given by Dickens to a friend who had loaned him £270. Purchased by Pierpont Morgan in the 1890s, it was informally appraised recently for more than $5 million, according to Kiely — that’s more than twice what Dickens earned over his lifetime in today’s dollars.

Anxiety over money is what distinguishes man from all other beasts, Jules Renard wrote. “A Christmas Carol” shows that this stress can do great harm, as in the case of the Cratchit family, or great art, as proven by the very existence of the novella.

To be sure, deadlines and debts are hardly essential to the production of great work. Finance may be a technology of incentives, but Dickens did not write for money alone. Many artists, in fact, seem utterly immune to pecuniary pressures and due dates, most notably Leonardo da Vinci.

As Walter Isaacson relates in his new biography of the ultimate Renaissance man, da Vinci spent his whole life blowing deadlines and failing to follow through with commissions.

“Alas, this man will never get anything done,” the pope complained when da Vinci ignored his deadlines. Rather than get paid for another portrait he was commissioned to paint, he toiled at it for more than a decade, and as a result we have the “Mona Lisa.”

But Leonardo is an outlier, of course.

So here’s to financial stress and deadline pressure, even if few of us can be Marx or Dickens. To paraphrase Tiny Tim, God bless ‘em, every one.