Linear Interpolation Formula
y = y1 + (x - x1) × (y2 - y1) / (x2 - x1)
When to Use
- Estimating values between known data points
- Filling gaps in tables or charts
- Animation tweening and smooth transitions
Find the interpolated y value between two known data points using linear interpolation.
What would make it better?
y = y1 + (x - x1) × (y2 - y1) / (x2 - x1)