top of page
Search

I Built A Physical DCF Calculator And Piotroski Score Calculator. Step-by-Step Explanations With Illustrations.

  • Writer: Sanzhi Kobzhan
    Sanzhi Kobzhan
  • 3 days ago
  • 4 min read
I Built A Physical DCF Calculator And Piotroski Score Calculator
I Built A Physical DCF Calculator And Piotroski Score Calculator

AI has made it easier than ever to build apps, publish articles, and automate simple tasks. That is useful, but it also raises the bar. I wanted to go beyond another web tool and build something physical: a custom investor calculator that combines hardware, software, and financial logic in one device.


Key Takeaways


  • I turned two investor tools into one physical device: a DCF calculator and a piotroski score calculator.

  • The project uses an Arduino Uno R3, LCD screen, keypad, joystick, breadboard, and jumper wires from a RexQualis starter kit.

  • The device lets users choose a calculator, enter financial assumptions, and view results directly on the LCD.

  • The goal was not just to calculate faster, but to make complex valuation and quality checks feel simple, focused, and tangible.


Why I Built It


I have already built free calculators for investors, including tools for estimating a stock target price, and checking a company with a piotroski f-score calculator.


But software alone was not enough for this experiment. I wanted to see what happens when financial analysis becomes a physical workflow. Instead of typing into a web page, the user interacts with real buttons, a joystick, and a small screen.


DCF analysis estimates value by discounting expected future cash flows, while the Piotroski F-Score uses nine accounting signals to assess business quality. Those two models made sense for a first device because they are structured, input-driven, and useful for investors.


Ordering parts


To start, I ordered the RexQualis Super Starter Kit for Arduino Uno R3 from MercadoLibre. The kit includes an Arduino-compatible controller, breadboard, LCD module, jumper wires, sensors, keypad-style components, and other parts for prototyping.


RexQualis Super Starter Kit for Arduino Uno R3
RexQualis Super Starter Kit for Arduino Uno R3

The goal was to keep the prototype simple: one screen for output, one keypad for numbers, and one joystick for navigation.


How I Connected The Hardware


The Arduino powered the breadboard rails through 5V and GND. The LCD I2C module connected to the same power rails, with SDA connected to A4 and SCL connected to A5. On the Arduino Uno R3, A4 is used for SDA and A5 is used for SCL/I2C communication.


The joystick used 5V and GND from the breadboard, VRx to A0, VRy to A1, and SW to A2. The keypad used digital pins D2 through D9, with four row pins and four column pins. This matches the typical row-column matrix approach used by Arduino keypad libraries.


Building a DCF and Piotroski F-Score calculator
Building a DCF and Piotroski F-Score calculator

The LCD became the output layer. The keypad became the main input layer. The joystick became a secondary control system, allowing the user to move through menus, confirm inputs, delete values, and access details.


Arduino connectors

Part

Pin

Connect to

Arduino

5V

Breadboard `+` rail

Arduino

GND

Breadboard `-` rail

LCD I2C

VCC

Breadboard `+` rail

LCD I2C

GND

Breadboard `-` rail

LCD I2C

SDA

A4

LCD I2C

SCL

A5

Joystick

5V / VCC

Breadboard `+` rail

Joystick

GND

Breadboard `-` rail

Joystick

VRx

A0

Joystick

VRy

A1

Joystick

SW

A2

Keypad


D2-D9


After connecting everything, my calculator starts taking some shape.


Building a Piotroski F-Score and DCF calculator
Building a Piotroski F-Score and DCF calculator

How The Software Works


After wiring the device, I installed Arduino IDE and wrote the calculator logic. The code uses the Wire library for I2C communication, LiquidCrystal_I2C for the LCD, and Keypad for the numerical keyboard. The LiquidCrystal I2C library is designed for controlling I2C LCD displays with functions similar to the standard LiquidCrystal library.


The program starts with a menu where the user chooses between two calculators: Piotroski F and DCF Calc. The joystick can move through the menu, and the keypad confirms the selection.


For number entry, the keypad controls are mapped clearly. The # key confirms, A adds a decimal point, B toggles a negative sign, C clears the input, and D deletes the last character. The joystick mirrors these controls, which makes the prototype easier to use even without relying only on the keypad.


Download the complete code:



How The Piotroski Score Calculator Works


The piotroski score calculator asks for current and prior-year financial data. That includes net income, operating cash flow, total assets, debt, current assets, current liabilities, shares outstanding, revenue, and gross profit.


The code then calculates nine signals. These include positive return on assets, positive operating cash flow, improving ROA, cash flow greater than net income, lower leverage, stronger current ratio, no share dilution, improving gross margin, and improving asset turnover.

Each passing signal adds one point. The final result is displayed as an F-Score from 0 to 9, with details available on the LCD.


How The DCF Calculator Works


The DCF calculator allows users to enter free cash flow assumptions, forecast years, growth rates, discount rate, terminal assumptions, net debt, shares outstanding, and current share price.


The user can choose between free cash flow per share or total company free cash flow. The terminal value can be calculated using either a perpetuity growth method or an exit multiple method. These are common approaches for estimating value beyond the forecast period in a DCF model.


The device calculates present value of forecast cash flows, terminal value, enterprise value, equity value, fair value per share, upside or downside, and margin of safety. It also prints a more detailed report and sensitivity table in the Serial Monitor.


What The Prototype Proves


This project is not just about building a calculator. It is about changing the way investors interact with financial models.


A spreadsheet can feel abstract. A website can feel temporary. A physical calculator turns valuation into a more deliberate process. You select a model, enter assumptions, press a button, and get a focused result.


Piotroski F-Score and DCF based stock target price calculator
Piotroski F-Score and DCF based stock target price calculator

That is the real value of this prototype: it brings investing logic into a simple hardware interface.


Next Steps


The next step is to turn this working prototype into a finished physical product. I want to buy a 3D printer and design a custom calculator body, so the Arduino, LCD, joystick, keypad, and wiring can sit inside a clean, durable case. That would move the project from a breadboard prototype to something that feels like a real investor tool.


Stock target price (DCF based) and Piotroski f score calculator body.
Stock target price (DCF based) and Piotroski f score calculator body.

Would you buy this calculator when it is ready?

  • Yes

  • No

  • Not sure


If you want to follow the build and get notified when I release the physical version, you can subscribe to my newsletter

 
 
 
bottom of page