Exporting YNAB to Ledger

My wife and I have been using You Need a Budget (YNAB) for a few months now. Overall, we like it, but the lack of reporting is a big missing feature. It's hard to answer questions about spending trends, such as how much we spend on Dining Out every month.

Previously, I've used Ledger for accounting, and I really liked it. It's a powerful tool, but the data entry is tedious.

Once I learned that YNAB data could be exported as a CSV, I realized that I could combine the best of these tools: YNAB for day to day transactions and budgeting, and Ledger for more advanced reporting.

I wrote a simple script to convert the CSV into a Ledger journal, and I pushed it to GitHub.

Now, I can run reports using the Ledger command line tool. For example, here is how I view my Dining Out spending per month (with a running average):

% ledger -f ynab_ledger.dat --monthly --average register Dining Out

16-Aug-01 - 16-Aug-31          Just for Fun: Dining Out       $432.56      $432.56  
16-Sep-01 - 16-Sep-30          Just for Fun: Dining Out       $534.47      $483.51  
16-Oct-01 - 16-Oct-31          Just for Fun: Dining Out       $451.79      $472.94  

You can see more report examples in the ynab_to_ledger README or in the Ledger Manual.